Update Changesets by Daily #4369
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: Update Changesets by Daily | |
on: | |
schedule: | |
- cron: "13 */2 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "./.node-version" | |
- name: Update Changesets | |
shell: bash | |
run: | | |
npx unity-changeset list --all --pretty-json > ./src/app/changesets.json | |
- name: Commit Changes | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git diff-index --quiet HEAD || git commit -m "chore: update changesets" | |
git push origin main |