Skip to content

ci: fix pr-tarball for fork PRs using pull_request_target#586

Merged
jesseturner21 merged 1 commit intoaws:mainfrom
Hweinstock:fix/pr-tarball-forks
Mar 20, 2026
Merged

ci: fix pr-tarball for fork PRs using pull_request_target#586
jesseturner21 merged 1 commit intoaws:mainfrom
Hweinstock:fix/pr-tarball-forks

Conversation

@Hweinstock
Copy link
Contributor

Description

The pr-tarball job fails on fork PRs because github.token from a fork has read-only access to the upstream repo — it cannot create releases or write PR comments.

This extracts pr-tarball into its own workflow using pull_request_target (which runs with upstream repo permissions) and gates it on author_association being OWNER, MEMBER, or COLLABORATOR. This ensures fork PRs from org members get tarballs while untrusted external PRs are skipped.

Related Issue

N/A — CI fix

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

  • Validated YAML formatting via pre-commit (prettier + secretlint passed).
  • The collaborator check uses github.event.pull_request.author_association which GitHub populates automatically — MEMBER covers all aws org members, COLLABORATOR covers explicitly added external users.

Checklist

  • I have read the CONTRIBUTING document
  • My changes generate no new warnings

@github-actions github-actions bot added the size/m PR size: M label Mar 20, 2026
@Hweinstock Hweinstock marked this pull request as ready for review March 20, 2026 14:11
@Hweinstock Hweinstock requested a review from a team March 20, 2026 14:11
@jesseturner21 jesseturner21 merged commit 686dbee into aws:main Mar 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants