-
-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (46 loc) · 1.48 KB
/
auto-dependency-updater.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Auto dependency updater
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['1.0', '1.1', '1.2', '1.3', '2.0']
name: Update dependencies "v${{matrix.version}}"
steps:
- name: Checkout specific branch
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
ref: 'release/${{matrix.version}}'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Install tools
run: npm i lerna npm-check-updates --no-save
- name: Update dependencies
run: npm run ncu
- name: Install dependencies
run: npm run reinstall
# - name: Format templates
# run: npm run format:tpl
- name: Commit changed files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git status
git commit -m "chore: auto dependency update"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'release/${{matrix.version}}'