Daily Generate Patch #33
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: Daily Generate Patch | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
patch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22' | |
cache: 'npm' | |
- name: Install root dependencies | |
run: npm install | |
working-directory: ./ | |
- name: Install client dependencies | |
run: npm install | |
working-directory: ./packages/client | |
- name: Run patch script | |
run: npm run patch | |
working-directory: ./packages/client | |
- name: Check for changes | |
id: git_diff | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git diff --cached --exit-code || echo "changes=true" >> $GITHUB_OUTPUT | |
working-directory: ./packages/client | |
- name: Create Pull Request | |
if: steps.git_diff.outputs.changes == 'true' | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: 'chore: bump patch version and update generated files' | |
title: 'chore: Bump patch version and update generated files' | |
body: | | |
This PR was automatically generated by a daily patch workflow. | |
branch: auto/patch-${{ github.run_id }} | |
base: main | |
labels: automated |