Skip to content

fix(ci): upgrade GitHub App token action with safe Dependabot fallback - #156

Closed
vitormattos wants to merge 1 commit into
mainfrom
fix/preview-app-token-v3-trusted-pr-20261111
Closed

vitormattos wants to merge 1 commit into
mainfrom
fix/preview-app-token-v3-trusted-pr-20261111

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Why this PR

Dependabot #136 upgrades actions/create-github-app-token from v2 to v3.3.0 but its preview run failed with private-key input must be set to a non-empty string. The triggering actor was dependabot[bot]: this workflow context did not have the Actions private-key secret; re-running the same run as a maintainer did not change the actor.

This trusted-maintainer PR allows the v3 update to be validated in a context where the scoped preview credentials are available, while fixing the underlying Dependabot-triggered behavior.

Changes

  • Use pinned actions/create-github-app-token@64ab729a... (v3.3.0) in 3 preview workflows.
  • For dependabot[bot] PR runs, upload the unprivileged HTML preview artifact, exactly as for fork PRs; do not request the scoped GitHub App token or deploy/comment to the preview origin.
  • Other internal contributor PRs keep the standard scoped preview deploy, published routes and CI checks.
  • No secrets stored in the PR. Legacy app-id remains until the separate client-id variable is configured.

Tests

  • GitHub Action PR Preview must pass under this trusted branch with a real v3 scoped token and full Sphinx/OpenAPI checks.
  • Dependabot-path guard is structurally verified in the workflow diff. A bot-triggered run lacks the secret, so it must not call the v3 action.

Replaces the broken #136 path when checks pass; no deploy to the production documentation. Signed commit and DCO.

Upgrade to pinned actions/create-github-app-token 3.3.0 for trusted
runs. Dependabot pull_request events do not have access to the Actions
private-key secret, so publish an unprivileged artifact instead of
attempting deployment with an empty key.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1-4-g2a6da11

QR code for preview link

🚀 View preview at
https://libresign.github.io/site-preview/docs-preview/pr-156/

Built to branch gh-pages at 2026-11-11 22:58 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Documentation: All versions · LibreSign 16 development manual · Review notes

Preview is separate from production. LibreSign 16 has not been released; the development manual describes the upcoming version.

Copy link
Copy Markdown
Member Author

Closing as superseded by #159 (merged as d9a5675b4d03066b3d8731f8d6506499a6e91da3). The current main already pins actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 (v3.3.0, latest upstream release) in all three preview workflows, and routes Dependabot-authored PRs through the unprivileged artifact + trusted deployment workflow.

The conflicts are caused by overlapping edits in preview.yml and preview-fork-deploy.yml. Resolving them by rebasing #156 would reapply already-integrated changes and could regress the guard to github.actor, which is not stable across reruns. No functional change remains to merge.

Separate dependency audit: actions/upload-artifact v7.0.0 and actions/download-artifact v8.0.0 have upstream patch releases v7.0.2 and v8.0.2, respectively. Those are independent updates and should not be bundled into this obsolete PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant