Skip to content

Commit 6a9702c

Browse files
committed
ci: dependencies updater
1 parent a28303e commit 6a9702c

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/update.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: ⬆️ update
2+
3+
on:
4+
workflow_run:
5+
workflows: [🚀 release]
6+
types:
7+
- completed
8+
9+
jobs:
10+
update:
11+
strategy:
12+
matrix:
13+
include:
14+
- repository: harmonix-js/starter
15+
dependencies:
16+
install: '@harmonix-js/core@latest'
17+
dev: '@harmonix-js/cli@latest'
18+
- repository: harmonix-js/cli
19+
dependencies:
20+
install: '@harmonix-js/core@latest'
21+
dev: ''
22+
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4.1.5
26+
with:
27+
repository: ${{matrix.repository}}
28+
ref: main
29+
token: ${{secrets.ACTION_GITHUB_TOKEN}}
30+
- uses: actions/setup-node@v4.0.2
31+
with:
32+
node-version: 20.x
33+
- run: npm install
34+
- name: Update dependencies
35+
run: |
36+
npm install ${{matrix.dependencies.install}}
37+
if [ -n "${{matrix.dependencies.dev}}" ]; then
38+
npm install -D ${{matrix.dependencies.dev}}
39+
fi
40+
- name: Commit changes
41+
run: |
42+
git config user.email ${{secrets.EMAIL}}
43+
git config user.name ${{secrets.NAME}}
44+
git commit -am "fix: update dependencies" || echo "No changes to commit"
45+
git push
46+

0 commit comments

Comments
 (0)