Skip to content

feat(workflows)!: step 5, clean up PR tags of every discovered image - #46

Open
seantronsen wants to merge 13 commits into
seantronsen/feat/decouple-trivyfrom
seantronsen/feat/decouple-pr-cleanup
Open

seantronsen wants to merge 13 commits into
seantronsen/feat/decouple-trivyfrom
seantronsen/feat/decouple-pr-cleanup

Conversation

@seantronsen

@seantronsen seantronsen commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Step 5 of the v4 stack (on top of #44). Decouples pr-registry-cleanup the same way #44 decouples Trivy, so repos that publish more than one image get every image's PR tags cleaned up.

  • Image names come from actions/discover-ghcr-images (feat(workflows)!: step 4, scan every published image with Trivy #44), verified to exist.
  • One cleanup job per image (matrix); deletes pr-<N> and pr-<N>-<qualifier> tags, never pr-123.
  • Failures are loud: every failed delete is logged, then the job fails.
  • Skips fork PRs; fails on non-pull_request triggers.

Breaking: removes the pr-number and tag-prefix inputs (the tag is always pr-<N>, as build-release-goreleaser publishes it), and callers must grant contents: read alongside packages: write.

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass (actionlint, zizmor)
  • I have updated the relevant documentation (CLI examples, man pages, README, other docs, etc.)
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Dependency update
  • Build system/CI

🤖 Generated with Claude Code

…releaser

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
…on workflows

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
… validated

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
…watch for updates

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
@seantronsen
seantronsen added this pull request to stack #40 October 13, 2026 19:48
@seantronsen seantronsen changed the title feat!: clean every discovered image, one job per image feat(workflows)!: step 5, clean up PR tags of every discovered image Oct 13, 2026
@seantronsen

Copy link
Copy Markdown
Contributor Author

See OpenCHAMI/github-actions-testbed#9
for test results.

@seantronsen seantronsen self-assigned this Oct 13, 2026
@seantronsen
seantronsen marked this pull request as ready for review October 13, 2026 20:03
@seantronsen seantronsen added this to the v4.0.0 milestone Oct 13, 2026

@synackd synackd 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.

Initial review, rebase needed to eliminate stale history.

versions=$(gh api --paginate \
"/orgs/${OWNER}/packages/container/${PACKAGE}/versions" \
| jq -r --arg base "${base_tag}" '
versions=$(gh api --paginate "/orgs/${OWNER}/packages/container/${PACKAGE}/versions" \

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.

URL encoding. See #44 (comment)

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.

2 participants