Skip to content

ci: log in to GHCR inline in release-publish.yml (bypass ASF Actions allow-list)#154

Merged
epugh merged 1 commit into
apache:mainfrom
adityamparikh:ci/release-publish-inline-login
Jun 19, 2026
Merged

ci: log in to GHCR inline in release-publish.yml (bypass ASF Actions allow-list)#154
epugh merged 1 commit into
apache:mainfrom
adityamparikh:ci/release-publish-inline-login

Conversation

@adityamparikh

Copy link
Copy Markdown
Contributor

Problem

release-publish.yml authenticates to GHCR with docker/login-action in two GHCR‑login steps. That third‑party action is not on the Apache org's GitHub Actions allow‑list, and allow‑list rejection happens at workflow‑parse time — so the action fails the entire workflow at startup (zero jobs run) the moment a release is run.

The SHA‑pin to 650006c6… (v4.2.0) added in #145 does not help: that SHA isn't allow‑listed. (The graalvm/setup-graalvm@329c42c… pin in the same file is allow‑listed and is left untouched.)

This workflow is dormant today (manual release trigger), so it isn't failing CI now — but it would startup‑fail the first time someone cuts a release.

Fix

Unlike #153 (where build-and-publish.yml doesn't publish, so the job was removed), release-publish.yml genuinely needs to publish — so it keeps the login, just inline:

  • Replace both docker/login-action GHCR‑login steps with an inline docker login ghcr.io using the built‑in GITHUB_TOKEN.
  • Token is piped via stdin (--password-stdin) so it never appears on the command line or in logs; the username is read from an env: var, so no untrusted value is interpolated into the run: script.

This removes the allow‑list dependency entirely — the inline docker login uses only the Docker CLI already on the runner.

18 insertions, 10 deletions, one file. No publish behavior changes — the subsequent Jib push steps and Docker Hub publishing are untouched.

Companion PR

This is the follow‑up to #153 (which fixed build-and-publish.yml by removing its unused publish job). Together they clear docker/login-action from both workflows.

🤖 Generated with Claude Code

…s allow-list

release-publish.yml authenticates to GHCR with docker/login-action, a third-party action not on the Apache org's GitHub Actions allow-list. Allow-list rejection is parse-time, so it fails the whole workflow at startup (zero jobs) the moment a release runs. The v4.2.0 (650006c6) SHA-pin from apache#145 does not help — that SHA is not allow-listed, unlike graalvm (329c42c), which is and is left as-is.

Replace both GHCR login steps with an inline 'docker login' using the built-in GITHUB_TOKEN. The token is piped via stdin (never on the command line or in logs) and the username is read from an env var, so no untrusted value is interpolated into the run script. This removes the allow-list dependency.

Companion to apache#153, which removed the unused publish job from build-and-publish.yml. release-publish.yml genuinely needs to publish, so it keeps the login — just inline.

Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
epugh pushed a commit that referenced this pull request Jun 19, 2026
nightly-build.yml failed at startup on every scan (zero jobs) because of a secrets-in-if expression: 'if: ${{ secrets.APACHE_NIGHTLIES_USER != '\'''\'' }}'. The secrets context is not available in if: conditions, so GitHub rejects the workflow at parse time — a separate cause from the docker/login-action allow-list issue fixed in #153/#154.

The nightlies.apache.org upload was only a placeholder and a daily nightly pre-release isn't wanted, so remove the workflow entirely rather than fix the parse error. dev-docs/WORKFLOWS.md and dev-docs/DOCKER_PUBLISHING.md are updated to drop nightly references (dedicated section, comparison-matrix column, scenario, registry list, tagging).

Note: the 'COMPARISON WITH OTHER WORKFLOWS' header comments in build-and-publish.yml, release-publish.yml, and atr-release.yml still list nightly-build; left as-is to avoid conflicts with #153/#154 which modify the first two.

Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@epugh epugh merged commit 1374ba3 into apache:main Jun 19, 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