Skip to content

feat(wait-for-docker-publish): add action to wait for image to appear in a registry - #1956

Merged
dylwylie merged 16 commits into
mainfrom
wait-for-docker-publish
Jun 10, 2026
Merged

feat(wait-for-docker-publish): add action to wait for image to appear in a registry#1956
dylwylie merged 16 commits into
mainfrom
wait-for-docker-publish

Conversation

@dylwylie

@dylwylie dylwylie commented May 26, 2026

Copy link
Copy Markdown
Contributor

Wait for an image to appear in an OCI registry, or fail after a timeout. Used to bridge the async GAR→DockerHub mirror, consumers can gate downstream work on the DockerHub side catching up.

Polls `docker manifest inspect` with exponential backoff until success or timeout.

@dylwylie
dylwylie marked this pull request as ready for review May 28, 2026 10:11
@dylwylie
dylwylie requested a review from a team as a code owner May 28, 2026 10:11
phlope
phlope previously approved these changes Jun 1, 2026
dylwylie added 16 commits June 10, 2026 10:21
docker manifest inspect defaults to HTTPS and produces a misleading 'no
such manifest' for HTTP-only registries like the registry:2 service
container. ttl.sh is anonymous, HTTPS-served, and auto-expires images,
so the test exercises the same code path real callers will hit.
- Include github.run_attempt in the test tag so workflow reruns don't
  collide with the previous attempt's image (run_id stays the same
  across reruns; only run_attempt increments).
- Reject initial-interval/max-interval < 1s in wait.sh. A zero value
  turned the loop into a hot poller against the timeout budget.
- Add an outputs: block to the publish job in the README example so
  needs.publish.outputs.digest actually resolves.
@dylwylie
dylwylie added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit b54eb4c Jun 10, 2026
21 checks passed
@dylwylie
dylwylie deleted the wait-for-docker-publish branch June 10, 2026 09:59
blewis12 added a commit to grafana/alloy that referenced this pull request Jun 25, 2026
…ondition (#6585)

This PR incorporates the [GAR mirror wait
action](grafana/shared-workflows#1956) into
workflows where there could be a race condition if mirror fails or is
slow:

1. `publish-alloy-devel.yml` => this workflow will first publish devel
images to GAR, then immediately proceeds to open a PR against
`deployment_tools`. We can insert a wait action between the former and
latter steps
2. `trigger-argo-workflow-on-tag.yml` => this workflow will trigger an
argo deployment workflow that deploys devel images to our internal
environment for testing, we can use this wait action as a check to
ensure that mirroring is complete before we start opening any PR's
against `deployment_tools` as part of the argo workflow

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

3 participants