Update dependency prettier to v3.8.2 (#13410) #1586
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 CDN IP Ranges | |
| on: | |
| # run if manually triggered | |
| workflow_dispatch: | |
| # run if something on the `main` branch changes | |
| push: | |
| branches: | |
| - main | |
| # run every hour at XX:42 | |
| schedule: | |
| - cron: "42 * * * *" | |
| permissions: {} | |
| concurrency: | |
| group: update-cdn-ip-ranges | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'rust-lang' }} | |
| permissions: | |
| contents: write # needed to `git push` the updated CDN IP ranges back to the `main` branch | |
| steps: | |
| - uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.WORKFLOWS_CRATES_IO_APP_ID }} | |
| private-key: ${{ secrets.WORKFLOWS_CRATES_IO_PRIVATE_KEY }} # zizmor: ignore[secrets-outside-env] repository write access is already the effective boundary; an environment adds no meaningful protection | |
| - name: Get GitHub App User ID | |
| id: get-user-id | |
| run: echo "user-id=$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | |
| env: | |
| APP_SLUG: ${{ steps.app-token.outputs.app-slug }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| - run: git config --global user.name "${APP_SLUG}[bot]" | |
| env: | |
| APP_SLUG: ${{ steps.app-token.outputs.app-slug }} | |
| - run: git config --global user.email "${USER_ID}+${APP_SLUG}[bot]@users.noreply.github.com" | |
| env: | |
| APP_SLUG: ${{ steps.app-token.outputs.app-slug }} | |
| USER_ID: ${{ steps.get-user-id.outputs.user-id }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| persist-credentials: true | |
| - run: python3 crates/crates_io_real_ip/update-data.py | |
| - run: git diff --exit-code | |
| id: git-diff | |
| continue-on-error: true | |
| # Prevent build failures from getting a git commit | |
| - run: cargo check --package crates_io_real_ip | |
| if: steps.git-diff.outcome == 'failure' | |
| - run: git commit --all --message "Update CDN IP ranges data" | |
| if: steps.git-diff.outcome == 'failure' | |
| - run: git push origin main | |
| if: steps.git-diff.outcome == 'failure' |