-
Notifications
You must be signed in to change notification settings - Fork 0
ci: harden UltraModern GitHub Actions workflows #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,13 +29,16 @@ jobs: | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When this workflow runs in a private/internal repository, the immediately following Useful? React with 👍 / 👎. |
||
|
|
||
| - name: Check skip CI | ||
| run: echo "RESULT=$(node ./scripts/skipCI.js)" >> "$GITHUB_OUTPUT" | ||
| id: skip-ci | ||
|
|
||
| - name: Log skip CI result | ||
| run: echo "${{steps.skip-ci.outputs.RESULT}}" | ||
| env: | ||
| SKIP_CI_RESULT: ${{ steps.skip-ci.outputs.RESULT }} | ||
| run: echo "$SKIP_CI_RESULT" | ||
|
|
||
| - name: Setup Node.js 26.x | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this workflow is used from a private repository or fork,
actions/configure-pages@v6calls the GitHub PagesgetPagesAPI, which requires Pages read permission. This job-levelpermissionsblock grants onlycontents: read(unspecified scopes becomenone), so theConfigure Pagesstep fails withResource not accessible by integrationbefore any artifact is uploaded; addpages: readto the build job while keeping write/OIDC limited to deploy.Useful? React with 👍 / 👎.