auto update dependencies #763
This file contains hidden or 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: auto update dependencies | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 0 0 * * * | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| updated: ${{ steps.set-output.outputs.updated }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Check updates | |
| id: taze | |
| run: bun x -b taze -a --failOnOutdated | |
| continue-on-error: true | |
| - name: Updates dependencies | |
| if: steps.taze.outcome == 'failure' | |
| run: bun x -b taze -w | |
| - name: Commit changes | |
| if: steps.taze.outcome == 'failure' | |
| run: | | |
| git config --local user.name 'github-actions[bot]' | |
| git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add package.json | |
| git commit -m 'chore(deps): update dependencies' | |
| git push | |
| - name: Set output | |
| id: set-output | |
| if: steps.taze.outcome == 'failure' | |
| run: echo "updated=true" >> $GITHUB_OUTPUT | |
| lint: | |
| needs: update | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/js.yml | |
| if: needs.update.outputs.updated == 'true' |