Update #2648
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: Update | |
| on: | |
| schedule: | |
| - cron: '0 0,12 * * *' | |
| permissions: | |
| contents: none | |
| jobs: | |
| update: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| token: ${{ secrets.DEPLOY_TOKEN }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --ignore-scripts | |
| - name: Update dependencies | |
| run: pnpm update -r caniuse-lite browserslist browserslist-lint baseline-browser-mapping | |
| - name: Check dependencies | |
| id: changes | |
| run: node ./scripts/check-changes.js | |
| - name: Setup git config | |
| if: steps.changes.outputs.changes | |
| run: | | |
| git config user.name "Andrey Sitnik" | |
| git config user.email "andrey@sitnik.ru" | |
| - name: Run tests | |
| if: steps.changes.outputs.changes | |
| run: pnpm test | |
| - name: Commit changes | |
| if: steps.changes.outputs.changes | |
| run: | | |
| git add pnpm-lock.yaml **/package.json | |
| git commit -m "Update caniuse-lite and browserslist" | |
| - name: Push changes | |
| if: steps.changes.outputs.changes | |
| run: git push --follow-tags |