Update known checksums #314
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: "Update known checksums" | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 4 * * *" # Run every day at 4am UTC | |
| repository_dispatch: | |
| types: [ pypi_release ] | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: true | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| - name: Update known checksums | |
| id: update-known-checksums | |
| run: | |
| node dist/update-known-checksums/index.cjs | |
| src/download/checksum/known-checksums.json | |
| - name: Check for changes | |
| id: changes-exist | |
| run: | | |
| git status --porcelain | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "changes-exist=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changes-exist=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Compile changes | |
| if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }} | |
| run: npm ci --ignore-scripts && npm run all | |
| - name: Create Pull Request | |
| if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }} | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| commit-message: "chore: update known checksums" | |
| title: | |
| "chore: update known checksums for ${{ | |
| steps.update-known-checksums.outputs.latest-version }}" | |
| body: | |
| "chore: update known checksums for ${{ | |
| steps.update-known-checksums.outputs.latest-version }}" | |
| base: main | |
| labels: "automated-pr,update-known-checksums" | |
| branch: update-known-checksums-pr | |
| delete-branch: true |