Skip to content

ci: drop GHCR/Docker publishing from build-and-publish.yml#153

Merged
epugh merged 1 commit into
apache:mainfrom
adityamparikh:ci/drop-docker-publish
Jun 19, 2026
Merged

ci: drop GHCR/Docker publishing from build-and-publish.yml#153
epugh merged 1 commit into
apache:mainfrom
adityamparikh:ci/drop-docker-publish

Conversation

@adityamparikh

Copy link
Copy Markdown
Contributor

Problem

build-and-publish.yml has never had a successful run — it fails at startup with zero jobs executed, on every push to main and (as attributed) on every PR.

Root cause: the publish-docker job uses docker/login-action, a third‑party action that is not on the Apache org's GitHub Actions allow‑list. Allow‑list rejection happens at workflow‑parse time, before the job's if: github.event_name != 'pull_request' guard is ever evaluated — so a publish job that wouldn't even run on PRs still takes the entire workflow down at startup, killing the build and solr-compatibility (Solr‑version matrix) jobs along with it.

A prior fix (#145) SHA‑pinned the action to 650006c6… (v4.2.0) on the assumption it was allow‑listed, but the workflow still never starts — unlike native.yml, whose graalvm pin (329c42c) genuinely is allow‑listed and now runs.

Fix

We do not publish images from this workflow (releases are handled by release-publish.yml), so rather than reauthenticate to a registry we don't use, this removes the publishing entirely:

  • Remove the publish-docker job (GHCR login + Jib push to GHCR/Docker Hub + summary) — this deletes the allow‑list‑blocking docker/login-action reference.
  • Rename the workflow Build and PublishBuild and Test (it no longer publishes).
  • Drop the tags: 'v*' trigger, which existed only to publish release images.
  • Update the header docs to reflect build + test; comparison notes for release-publish.yml / nightly-build.yml are left intact.

Net: 20 insertions, 214 deletions, one file.

Result

The workflow file now parses, so the next push to main runs build + solr-compatibility — the first green this workflow can produce. Because the (valid) on: block has no pull_request trigger, it will run on main pushes + manual dispatch only and stop appearing as a red ✗ on PRs; PR validation remains with ci.yml.

Notes

  • release-publish.yml still references the same docker/login-action@650006c6… in two GHCR‑login steps. It's dormant (manual release trigger), so it isn't failing anything today, but it will hit the same startup failure whenever a release is run — worth a follow‑up (there the fix is an inline docker login, since releases do need to publish).

🤖 Generated with Claude Code

The publish-docker job used docker/login-action, a third-party action not on the Apache org's GitHub Actions allow-list. Allow-list rejection happens at workflow-parse time, before the job's 'if: github.event_name != pull_request' guard is evaluated — so the publish job (which never even runs on PRs) failed the ENTIRE workflow at startup with zero jobs, taking the build and Solr-version compatibility test jobs down with it on every push and PR. The workflow has never had a successful run.

We don't publish images from this workflow, so remove the publish-docker job entirely rather than reauthenticating to a registry we don't use. It now only builds and tests (renamed 'Build and Test'); release publishing stays in release-publish.yml.

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 pushed a commit that referenced this pull request Jun 19, 2026
…s allow-list (#154)

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 #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 #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 epugh merged commit 7444af2 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