Repository navigation
ci: prepare release workflow for Docker Hub OIDC - #1101
Merged
Merged
Conversation
ilopezluna
force-pushed
the
chore/model-runner-dockerhub-oidc
branch
from
November 5, 2026 13:35
d3af0ab to
e74f735
Compare
ilopezluna
marked this pull request as ready for review
November 5, 2026 13:48
Contributor
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/release.yml" line_range="348" />
<code_context>
- password: ${{ secrets.ORG_ACCESS_TOKEN }}
+ env:
+ DOCKERHUB_OIDC_CONNECTIONID: ${{ vars.DOCKERHUB_OIDC_CONNECTION_ID }}
+ DOCKERHUB_OIDC_EXPIREIN: 3600
- name: Set up Buildx
</code_context>
<issue_to_address>
**Image pushes lose credentials**
When builds and pushes after a Docker Hub login take more than 3,600 seconds, `docker/login-action`'s token expires before later image pushes, so Docker Hub rejects them and the release leaves only some image variants published.
Refresh the Docker Hub login before its token expires during the build-and-push sequence.
Also at `.github/workflows/release.yml:418-424`.
</issue_to_address>
### Comment 2
<location path=".github/workflows/release.yml" line_range="347" />
<code_context>
username: "docker"
- password: ${{ secrets.ORG_ACCESS_TOKEN }}
+ env:
+ DOCKERHUB_OIDC_CONNECTIONID: ${{ vars.DOCKERHUB_OIDC_CONNECTION_ID }}
+ DOCKERHUB_OIDC_EXPIREIN: 3600
</code_context>
<issue_to_address>
**Image publishing stops on non-main refs**
When the workflow is dispatched from a ref other than `refs/heads/main`, `docker/login-action` rejects the OIDC token because the Docker Hub ruleset allows only `repo:docker/model-runner:ref:refs/heads/main`; the `prepare` job has already pushed the release tag, so the run stops before publishing images and leaves an incomplete release.
Restrict this workflow to the allowed main ref or update the Docker Hub ruleset to allow the dispatched ref.
</issue_to_address>
### Comment 3
<location path=".github/workflows/release.yml" line_range="519" />
<code_context>
+ echo "already=true" >> "$GITHUB_OUTPUT"
+ echo "✅ desktop-module:$RELEASE_TAG already exists — skipping trigger"
+ ;;
+ 404)
+ echo "already=false" >> "$GITHUB_OUTPUT"
+ ;;
</code_context>
<issue_to_address>
**Concurrent releases duplicate desktop trigger**
When two release runs for the same tag check the public endpoint before either downstream run publishes the module tag, both runs write `already=false`, so both pass the `published` guard and dispatch `release-cli-dd.yml`. The downstream workflows race to re-push the same module tag, and one release fails with Docker Hub's 403.
Serialize release runs for a tag or use an atomic deduplication mechanism before dispatching the downstream release.
</issue_to_address>
### Comment 4
<location path=".github/workflows/release.yml" line_range="511-525" />
<code_context>
- else
- echo "already=false" >> "$GITHUB_OUTPUT"
- fi
+ status=$(curl --silent --show-error --retry 3 --connect-timeout 10 \
+ --max-time 30 --output /dev/null --write-out '%{http_code}' \
+ "https://hub.docker.com/v2/repositories/docker/docker-model-cli-desktop-module/tags/$RELEASE_TAG")
+ case "$status" in
+ 200)
+ echo "already=true" >> "$GITHUB_OUTPUT"
+ echo "✅ desktop-module:$RELEASE_TAG already exists — skipping trigger"
+ ;;
+ 404)
+ echo "already=false" >> "$GITHUB_OUTPUT"
</code_context>
<issue_to_address>
**Workflow shell escapes ShellCheck**
When the new public-tag lookup is part of the release workflow, an invalid shell construct in this inline `run` block would pass the repository's ShellCheck validation, so CI does not enforce its all-shell-scripts check for this added code.
Extract the lookup into a `.sh` file covered by `make validate`, or add validation for inline workflow shell blocks.
</issue_to_address>
doringeman
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker/model-runner.mainbefore creating a tag, matching the OIDC trust policy.Validation
make validate-allactionlint -ignore SC2129 .github/workflows/release.yml(SC2129 is an existing style warning in unrelated inline scripts)OIDC setup
441d17e7-3a5b-4783-8d04-f3c072ac96e3for this workflow.DOCKERHUB_OIDC_CONNECTION_IDis set to that ID.Before merge
docker/model-runnerand Cloud Connect ondocker/make-product-smarterforrepo:docker/model-runner:ref:refs/heads/main.ORG_ACCESS_TOKEN.