Skip to content

ci(e2e): use GITHUB_TOKEN for GHCR e2e#1554

Merged
crazy-max merged 1 commit into
docker:masterfrom
crazy-max:e2e-ghcr
Jun 4, 2026
Merged

ci(e2e): use GITHUB_TOKEN for GHCR e2e#1554
crazy-max merged 1 commit into
docker:masterfrom
crazy-max:e2e-ghcr

Conversation

@crazy-max

Copy link
Copy Markdown
Member

Updates the e2e workflow so GHCR authentication uses the workflow GITHUB_TOKEN instead of a stored PAT.

The caller workflow grants packages: write to the reusable e2e job, and the reusable workflow falls back to github.actor and secrets.GITHUB_TOKEN when the registry is ghcr.io.

This removes the need for a long-lived GHCR PAT while keeping the generic registry secret mapping focused on external registries.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
# reusable workflow
name: .e2e-run

permissions:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why was this removed?

@crazy-max crazy-max Jun 4, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because we introduce packages: write and caller should take care of permissions, not the reusable workflow. There is some analysis here: docker/github-builder#24

Comment thread .github/zizmor.yml
@@ -0,0 +1,6 @@
rules:
# rule does not apply to reusable worfklows where permissions are defined by

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ah, right; so wouldn't it still make sense to set defaults, or won't that work?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah that won't work unfortunately, see docker/github-builder#24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's annoying! Is it a known issue in zizmor? Is this something that could be fixed in GitHub actions itself?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think this is tracked inb zizmor yeah

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@crazy-max crazy-max merged commit 7b93b2b into docker:master Jun 4, 2026
131 of 133 checks passed
@crazy-max crazy-max deleted the e2e-ghcr branch June 4, 2026 14:00
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