Skip to content

fix: move pages/id-token permissions to deploy job to fix action_required regression - #47201

Merged
pelikhan merged 2 commits into
mainfrom
copilot/aw-doc-build-deploy-regression-fix
Jul 22, 2026
Merged

fix: move pages/id-token permissions to deploy job to fix action_required regression#47201
pelikhan merged 2 commits into
mainfrom
copilot/aw-doc-build-deploy-regression-fix

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Doc Build - Deploy was producing 100% action_required runs (0 jobs, instant completion) on every PR triggered by github-actions[bot] (copilot branch auto-syncs). Push-to-main and Dependabot PR runs were unaffected.

Root cause: pages: write and id-token: write were declared at the workflow level. GitHub evaluates elevated permissions against the triggering actor before any job if: conditions are checked — so even though the deploy job has if: github.ref == 'refs/heads/main' || ... that would skip it for PRs, the entire workflow run was blocked with action_required and never started.

Fix: Move pages: write and id-token: write from workflow level to the deploy job:

# Before
permissions:
  contents: read
  pages: write      # ← elevated, applied to all triggers
  id-token: write   # ← elevated, applied to all triggers

# After
permissions:
  contents: read    # workflow level: safe for all triggers

jobs:
  deploy:
    permissions:
      pages: write      # scoped to deploy job only
      id-token: write   # scoped to deploy job only

PR runs now only carry contents: read at the workflow level; the elevated permissions are never requested because the deploy job is skipped. Push-to-main/release/dispatch runs continue to deploy normally using the job-level grant.

…ired regression

Elevated permissions (pages: write, id-token: write) at the workflow level
cause GitHub to block the entire workflow run with action_required when
triggered by pull_request events from github-actions[bot] (copilot branch
syncs), even though the deploy job has an if: condition that skips it.

Move those permissions to the deploy job level only. PR runs now have only
contents: read at workflow level, so the block never triggers. Push-to-main
runs deploy normally using the job-level permissions.

Closes #47194

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix deploy issue causing 100% action_required fix: move pages/id-token permissions to deploy job to fix action_required regression Jul 22, 2026
Copilot AI requested a review from pelikhan July 22, 2026 06:26
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category bug
Risk 🟢 Low
Score 72/100 (impact: 35, urgency: 25, quality: 12)
Action 🚀 fast_track

Tiny fix (+4/-3) that resolves 100% action_required CI failures on copilot-authored PRs. High urgency, minimal blast radius. Recommended for expedited human review.

Generated by 🔧 PR Triage Agent · sonnet46 35.2 AIC · ⌖ 7.92 AIC · ⊞ 5.6K ·

@pelikhan
pelikhan marked this pull request as ready for review July 22, 2026 07:26
Copilot AI review requested due to automatic review settings July 22, 2026 07:26
@pelikhan
pelikhan merged commit 002ce1f into main Jul 22, 2026
@pelikhan
pelikhan deleted the copilot/aw-doc-build-deploy-regression-fix branch July 22, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Scopes elevated GitHub Pages permissions to the deployment job, preventing blocked PR documentation builds.

Changes:

  • Keeps workflow-level access read-only.
  • Grants Pages and OIDC write access only to deployments.
Show a summary per file
File Description
.github/workflows/docs.yml Moves elevated permissions to the conditional deploy job.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.0

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Doc Build - Deploy: 100% action_required regression (2026-07-22)

3 participants