Skip to content

Daily Dependency Release Check #191

Daily Dependency Release Check

Daily Dependency Release Check #191

name: Daily Dependency Release Check
on:
schedule:
- cron: '0 8 * * *' # Runs at 8 AM UTC every day
workflow_dispatch: # Allows manual triggering
jobs:
check_releases:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run release check script
id: check-releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn tsx scripts/check-releases.ts
- name: Configure Git
if: ${{ steps.check-releases.outputs.updates_made == 'true' }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Switch to dependencies-updates branch and sync with master
if: ${{ steps.check-releases.outputs.updates_made == 'true' }}
run: |
# Create or switch to dependencies-updates branch
git checkout -B dependencies-updates || git checkout dependencies-updates
# Sync with master branch
git fetch origin master
git merge origin/master --no-edit
- name: Commit and push changes
if: ${{ steps.check-releases.outputs.updates_made == 'true' }}
run: |
git add dependencies.json
git commit -m "chore: update dependencies to latest versions
Updated projects:
${{ steps.check-releases.outputs.updated_projects }}"
git push origin dependencies-updates