Skip to content

fix(workflow): push screenshots-commit using GITHUB_TOKEN to avoid 403#444

Merged
vitorvasc merged 1 commit into
open-telemetry:mainfrom
vitorvasc:fix/screenshot-commit-workflow
May 11, 2026
Merged

fix(workflow): push screenshots-commit using GITHUB_TOKEN to avoid 403#444
vitorvasc merged 1 commit into
open-telemetry:mainfrom
vitorvasc:fix/screenshot-commit-workflow

Conversation

@vitorvasc
Copy link
Copy Markdown
Member

The PR Screenshots - Commit workflow has been returning HTTP 403 on git push origin otelbot/screenshots (example).

  • actions/checkout no longer passes a token: input, so it falls back to GITHUB_TOKEN. The push at git push origin otelbot/screenshots now authenticates with GITHUB_TOKEN, which has contents: write from the job-level permissions: block.
  • Uses the same pattern as nightly-registry-update.yml already uses to push to otelbot/automated-inventory-update.
  • The Get otelbot token step moves to immediately before Post or update PR comment, where its token is consumed via GH_TOKEN for the gh api calls.

…it workflow

Signed-off-by: Vitor Vasconcellos <vvasconcellos1@gmail.com>
@vitorvasc vitorvasc requested a review from Copilot May 11, 2026 10:53
@vitorvasc vitorvasc requested review from a team as code owners May 11, 2026 10:53
@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for otel-ecosystem-explorer canceled.

Name Link
🔨 Latest commit e91e9ab
🔍 Latest deploy log https://app.netlify.com/projects/otel-ecosystem-explorer/deploys/6a01b516ba840800084ea1bd

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the “PR Screenshots - Commit” GitHub Actions workflow authentication so the screenshots branch push uses the job’s GITHUB_TOKEN (with contents: write) instead of a GitHub App token, resolving the observed git push 403 failures. The GitHub App token step is retained but moved to just-in-time usage for gh api comment updates.

Changes:

  • Removed the GitHub App token from actions/checkout, letting it default to GITHUB_TOKEN for authenticated git push to otelbot/screenshots.
  • Moved the “Get otelbot token” step to immediately before the PR comment update step, and wired it via GH_TOKEN for gh api.

@vitorvasc vitorvasc enabled auto-merge (squash) May 11, 2026 10:55
@vitorvasc vitorvasc merged commit ae00990 into open-telemetry:main May 11, 2026
17 checks passed
@vitorvasc vitorvasc deleted the fix/screenshot-commit-workflow branch May 11, 2026 10:56
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.

3 participants