Skip to content

fix(ci): Pass the self-hosted image to the push jobs as an artifact - #2474

Open
juho9000 wants to merge 1 commit into
codecov:mainfrom
juho9000:fix/self-hosted-release-artifact-handover
Open

juho9000 wants to merge 1 commit into
codecov:mainfrom
juho9000:fix/self-hosted-release-artifact-handover

Conversation

@juho9000

@juho9000 juho9000 commented Oct 9, 2026 •

Copy link
Copy Markdown

Every self-hosted release since 26.5.18 (26.6.11, 26.7.6, 26.9.10) is tagged on GitHub
but never reaches Docker Hub. The release workflow runs on pull_request: closed, and
since June GitHub issues a read-only cache token to runs for a merged PR. The build job's
actions/cache save is denied (cache write denied: token has no writable scopes), the
job stays green, and Push Self Hosted Release Image fails on the miss
(https://github.com/codecov/umbrella/actions/runs/34520539245). #1609 added
actions: write to GITHUB_TOKEN, which does not affect the cache token, so it is
dropped here.

The build job now uploads the two tarballs as a run-scoped artifact and the push jobs
download it, the same way _build-app.yml hands the test image to _run-tests.yml.
A push to main still builds each app once: the second invocation downloads the artifact
the first one uploaded instead of rebuilding. The download step in the first invocation
reports an expected failure (continue-on-error).

Test plan: merge, cut a release PR, confirm push-api-image and push-worker-image
succeed and the version tag appears on Docker Hub for codecov/self-hosted-api and
codecov/self-hosted-worker.

Closes #2371
Closes codecov/feedback#963

Legal Boilerplate

Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.


Note

Medium Risk
Changes the release CI path that publishes self-hosted Docker images; wrong artifact wiring would block Hub pushes again, but scope is limited to workflow plumbing.

Overview
Fixes self-hosted release images not reaching Docker Hub when the workflow runs on a merged PR, because GitHub’s read-only cache token blocks saving the build job’s actions/cache entry while push jobs still expect a hit.

_self-hosted.yml now passes self-hosted-runtime.tar and self-hosted.tar between jobs via run-scoped artifacts (same idea as _build-app.yml → _run-tests.yml): the build job computes a stable artifact name from output_directory, optionally downloads an artifact from an earlier job in the same workflow (continue-on-error), builds only on miss, then uploads with 1-day retention and no compression. Rolling and release push jobs download that artifact and load it; cache steps and explicit cache-miss failures are removed.

self-hosted-release.yml drops the actions: write permission, which did not grant cache write access anyway.

Reviewed by Cursor Bugbot for commit 9f0ac07. Bugbot is set up for automated code reviews on this repo. Configure here.

Runs for a merged release PR get a read-only cache token, so the cache
save is denied and the push job finds nothing. No self-hosted release
since 26.5.18 has reached Docker Hub. actions: write (codecov#1609) does not
affect the cache token, so it is dropped.
@juho9000
juho9000 force-pushed the fix/self-hosted-release-artifact-handover branch from 7e6844e to 9f0ac07 Compare October 9, 2026 18:07
@juho9000

Copy link
Copy Markdown
Author

@thomasrockhu-codecov can you take a look at this?

This branch has not been deployed

No deployments
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.

Self-Hosted Images Not Being Released No self-hosted release tags since 26.5.18 (follow-up to issue #943)

1 participant