Bump dependencies #267
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
name: Bump dependencies | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 45 11 * * * # 60 min before Dependabot | |
push: | |
paths: | |
- package.json | |
- package-lock.json | |
- .github/workflows/bump.yml | |
branches: | |
- main | |
permissions: write-all | |
jobs: | |
bump: | |
name: Bump | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Bump | |
id: sync_types | |
uses: RedGuy12/[email protected] | |
- name: Setup Node.JS | |
uses: actions/[email protected] | |
with: | |
node-version: 20.6.0 | |
cache: npm | |
- name: Install | |
run: npm ci | |
- name: Format | |
run: npm run format | |
- name: Attempt build | |
run: npm run build | |
- name: Exit on failure | |
if: failure() | |
run: exit 1 | |
- name: Commit | |
id: commit | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: Bump dependencies | |
- name: Comment | |
if: steps.commit.outputs.changes_detected == 'true' | |
run: | | |
body="$(cat ${{ steps.sync_types.outputs.output-dir }}/changes.md)$(cat ${{ steps.sync_types.outputs.output-dir }}/sync.md)" | |
gh api "repos/${{ github.repository }}/commits/${{ steps.commit.outputs.commit_hash }}/comments" -F "body=$body" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |