Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 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 update (v1.2) | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
env: | ||
release_branch: 'release/1.2' | ||
update_branch: 'update/1.2' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout specific branch | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
ref: ${{ env.release_branch }} | ||
- name: Remove latest update branch | ||
continue-on-error: true | ||
run: | | ||
git branch -D ${{ env.update_branch }} | ||
git push --delete origin ${{ env.update_branch }} | ||
- name: Initial update branch | ||
run: git checkout -b ${{ env.update_branch }} | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2.1.5 | ||
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 update | ||
- name: Commit changed files | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git status | ||
git commit -m "Auto dependency update" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ env.update_branch }} | ||
force: true |