Skip to content

Upgrade Dependencies #4

Upgrade Dependencies

Upgrade Dependencies #4

Workflow file for this run

name: Upgrade Dependencies
on:
schedule:
- cron: '1 0 * * 0'
workflow_dispatch:
jobs:
yarn-upgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install Yarn
run: npm install -g yarn
- name: Setup git and create branch
env:
GITHUB_TOKEN: ${{ secrets.G_TOKEN }}
run: |
git config --global user.name "Raajheer1"
git config --global user.email "[email protected]"
git checkout -b chore/upgrade-dependencies-$(date +%Y-%m-%d)
git push --set-upstream origin chore/upgrade-dependencies-$(date +%Y-%m-%d)
- name: Upgrade dependencies
run: yarn upgrade --latest
- name: Lint fix
run: yarn lint:fix
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.G_TOKEN }}
run: |
git add .
git commit -m "chore: upgrade dependencies"
git push
- name: Create PR
env:
GITHUB_TOKEN: ${{ secrets.G_TOKEN }}
run: |
gh pr create -t "Chore: Upgrade Dependencies" -B master -H chore/upgrade-dependencies-$(date +%Y-%m-%d) --body "Weekly automated PR to upgrade dependencies using \`yarn upgrade --latest\`. Please verify the changes and merge."