Auto update dependencies #109
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: Auto update dependencies | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 23 * * 5' | |
env: | |
# allow yarn creating lockfile in CI environment | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
jobs: | |
auto-update-dependencies: | |
timeout-minutes: 4 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkouting repo | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 | |
with: | |
fetch-depth: 0 | |
- name: Node setup | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Update package versions | |
run: npx taze@latest -swf latest | |
- name: Update resolution versions | |
run: node ./scripts/update-resolution.cjs | |
shell: bash | |
- name: Update lock file | |
run: | | |
rm ./yarn.lock | |
yarn | |
- name: Test if project still builds | |
run: yarn build | |
- name: Commit and push changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git commit -am "chore: update deps" || echo "nothing changed ?" | |
git remote set-url origin https://${{ secrets.ACTIONS_PAT }}@github.com/logotip4ik/keycap | |
git push origin ${{ github.ref_name }} |