Auto dependency updater #1504
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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}}' |