Repository navigation
Daily Dependency Update #157
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: Daily Dependency Update | |
| on: | |
| schedule: | |
| # Run at 00:00 every day | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| update-dependencies: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.MEDIAPIPEBOT }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Update dependencies | |
| run: pnpm up --latest | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install chromium --with-deps | |
| - name: Run E2E Tests | |
| timeout-minutes: 10 | |
| run: pnpm run test | |
| - name: Create Pull Request with CLI | |
| if: success() | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.MEDIAPIPEBOT }} | |
| run: | | |
| git config user.name "mediapipe-bot" | |
| git config user.email "mediapipe-bot@google.com" | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| BRANCH_NAME="chore/auto-update-dependencies" | |
| git checkout -b $BRANCH_NAME | |
| git add -A | |
| git commit -m "chore(deps): update all dependencies to latest" | |
| git push origin $BRANCH_NAME --force | |
| gh pr create --title "Automated Dependency Updates" \ | |
| --body "Automated dependency updates triggered by daily GitHub Action schedule." \ | |
| --base main \ | |
| --head $BRANCH_NAME || true | |
| else | |
| echo "No changes to commit." | |
| fi |