Skip to content

Use org-wide delete-packages token for nightly GHCR pruning - #337

Merged
SeanTAllen merged 1 commit into
mainfrom
use-org-wide-delete-packages-token
Jun 15, 2026
Merged

Use org-wide delete-packages token for nightly GHCR pruning#337
SeanTAllen merged 1 commit into
mainfrom
use-org-wide-delete-packages-token

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

The nightly GHCR prune step fails because snok/container-retention-policy cannot list packages by wildcard (nightly/<name>-*) with the repo-scoped GITHUB_TOKEN — the GitHub API forbids package listing for that token type, so the step errors with "filtering with '!' and '*' are not supported for this token type".

Switch the prune token to the org-wide PONYLANG_MAIN_DELETE_PACKAGE_TOKEN, a classic PAT carrying read:packages + delete:packages, which can both enumerate and delete the wildcard-matched nightly images. This restores the delete-packages-PAT approach used before the recent switch to GITHUB_TOKEN.

snok/container-retention-policy must list packages to resolve the
"nightly/<name>-*" wildcard, and the GitHub API forbids package listing
with the repo-scoped GITHUB_TOKEN. The prune step therefore fails with
"filtering with '!' and '*' are not supported for this token type".

Switch to PONYLANG_MAIN_DELETE_PACKAGE_TOKEN -- a classic PAT carrying
read:packages + delete:packages -- which can both enumerate and delete
the wildcard-matched nightly images.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jun 15, 2026
@SeanTAllen
SeanTAllen merged commit 09588bd into main Jun 15, 2026
8 checks passed
@SeanTAllen
SeanTAllen deleted the use-org-wide-delete-packages-token branch June 15, 2026 01:22
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Jun 15, 2026
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