33 workflow_dispatch :
44 schedule :
55 - cron : " 0 4 * * *" # Run every day at 4am UTC
6+ repository_dispatch :
7+ types : [ pypi_release ]
68
79permissions : {}
810
1113 runs-on : ubuntu-24.04-arm
1214 permissions :
1315 contents : write
14- pull-requests : write
1516 steps :
1617 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1718 with :
@@ -26,18 +27,25 @@ jobs:
2627 src/download/checksum/known-checksums.ts
2728 version-manifest.json
2829 ${{ secrets.GITHUB_TOKEN }}
29- - run : npm install && npm run all
30- - name : Create Pull Request
31- uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
32- with :
33- commit-message : " chore: update known versions"
34- title :
35- " chore: update known versions for ${{
36- steps.update-known-versions.outputs.latest-version }}"
37- body :
38- " chore: update known versions for ${{
39- steps.update-known-versions.outputs.latest-version }}"
40- base : main
41- labels : " automated-pr,update-known-versions"
42- branch : update-known-versions-pr
43- delete-branch : true
30+ - name : Check for changes
31+ id : changes_exist
32+ run : |
33+ git status --porcelain
34+ if [ -n "$(git status --porcelain)" ]; then
35+ echo "changes_exist=true" >> "$GITHUB_OUTPUT"
36+ else
37+ echo "changes_exist=false" >> "$GITHUB_OUTPUT"
38+ fi
39+ - name : Compile changes
40+ if : ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
41+ run : npm ci && npm run all
42+ - name : Commit and push changes
43+ if : ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
44+ run : |
45+ git config user.name "$GITHUB_ACTOR"
46+ git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
47+ git add .
48+ git commit -m "chore: update known versions for $LATEST_VERSION"
49+ git push origin HEAD:refs/heads/main
50+ env :
51+ LATEST_VERSION : ${{ steps.update-known-versions.outputs.latest-version }}
0 commit comments