compose/.github/workflows/pr-review.yml
Guillaume Lours f7585f5998 ci: grant actions:write to PR review workflow
docker-agent-action v2.0.3 raised the review job's required permission
from actions:read to actions:write (cache delete for review-lock
release, feedback artifact management). GitHub refuses to start a
reusable workflow requesting more permissions than the caller grants,
so every PR Review run since the v2.0.3 bump ended in startup_failure
and docker-agent stopped launching automatically.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-08-13 14:52:12 +02:00

32 lines
1.4 KiB
YAML

name: PR Review
permissions:
contents: read # Required at top-level to give `issue_comment` events access to the secrets below.
# workflow_run is used deliberately here: the unprivileged "PR Review - Trigger"
# workflow runs on the fork PR and this privileged one only consumes its
# artifacts, never checks out or executes fork code.
on: # zizmor: ignore[dangerous-triggers]
issue_comment:
types: [ created ]
workflow_run:
workflows: [ "PR Review - Trigger" ]
types: [ completed ]
jobs:
review:
if: |
github.event_name == 'issue_comment' ||
github.event.workflow_run.conclusion == 'success'
uses: docker/docker-agent-action/.github/workflows/review-pr.yml@baf90543d81f5de59751dfd10e6cf45e21a5a982 # v2.0.3
# Scoped to the job so other jobs in this workflow aren't over-permissioned
permissions:
contents: read # Read repository files and PR diffs
pull-requests: write # Post review comments
issues: write # Create security incident issues if secrets detected
checks: write # (Optional) Show review progress as a check run
id-token: write # Required for OIDC authentication to AWS Secrets Manager
actions: write # Download artifacts from trigger workflow; cache delete for review-lock release (required since docker-agent-action v2.0.3)
with:
trigger-run-id: ${{ github.event_name == 'workflow_run' && format('{0}',
github.event.workflow_run.id) || '' }}