Skip to content

Commit

Permalink
chore: add auto dep update for v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio committed Mar 7, 2021
1 parent c2da46d commit 43e922a
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/auto-dependency-update.v1.2.yml
@@ -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

0 comments on commit 43e922a

Please sign in to comment.