Skip to content

Commit fe8ff13

Browse files
authored
fix(ci): remove unused Docker Hub login demo to prevent auth failures on main (#19)
* fix(ci): remove unused Docker Hub login demo steps (caused 'incorrect username or password' on main after merge); update login-action to v4 pin The Docker Hub login was a demo and not wired to any push (only GHCR used). Removing the gated steps eliminates the failure when secrets exist with bad values. No functional change to image publishing. Grok Build agent. Memory protocol followed. * fix(ci): remove ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION and inline login-action version comment - Remove job-level ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION env var (unnecessary with login-action v4) - Inline the login-action version comment to match convention of other pinned actions - Addresses Devin review threads on supply-chain security and comment pattern consistency * fix(ci): correct login-action version comment to v4.3.0 The pinned SHA c99871dec2022cc055c062a10cc1a1310835ceb4 corresponds to v4.3.0, not v4.
1 parent ab972ae commit fe8ff13

1 file changed

Lines changed: 16 additions & 23 deletions

File tree

.github/workflows/docker.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,26 @@ jobs:
2323
- name: Set up Docker Buildx
2424
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
2525

26-
# Determine Docker Hub login eligibility at runtime (no secrets. in any if: expression to satisfy CR/zizmor scanners; secrets passed via env: and referenced as $VAR in shell to avoid direct interpolation risk per Devin).
27-
- name: Check Docker Hub credentials available
28-
id: dockerhub
29-
env:
30-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
31-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
32-
EVENT_NAME: ${{ github.event_name }}
33-
run: |
34-
if [ "$EVENT_NAME" != "pull_request" ] && [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then
35-
echo "do_login=true" >> "$GITHUB_OUTPUT"
36-
else
37-
echo "do_login=false" >> "$GITHUB_OUTPUT"
38-
fi
39-
40-
# Demo: login to Docker Hub using GH secrets (added per request); real values needed in repo settings.
41-
# Gated via runtime check (addresses prior CR non-blocking + new secrets-in-if: findings).
42-
- name: Login to Docker Hub (using GH secrets)
43-
if: steps.dockerhub.outputs.do_login == 'true'
44-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
45-
with:
46-
username: ${{ secrets.DOCKER_USERNAME }}
47-
password: ${{ secrets.DOCKER_PASSWORD }}
26+
# Docker Hub login removed. It was a demo (per prior request) and is not used.
27+
# No docker.io images configured in metadata/build-push
28+
# (only ghcr.io/limen-neural/metabolic-ledger published on main).
29+
# This prevents spurious auth failures when DOCKER_* secrets are
30+
# present but invalid (common if using account password instead of
31+
# PAT, or wrong values).
32+
# GHCR login (using GITHUB_TOKEN + packages:write) remains and is the active
33+
# registry.
34+
# If Docker Hub publish wanted later:
35+
# 1) set proper DOCKER_USERNAME + DOCKERHUB_TOKEN (PAT from
36+
# hub.docker.com/settings/security with write scope),
37+
# 2) add docker.io entry to images in metadata,
38+
# 3) restore gated login.
39+
# Cleanup by Grok Build agent in fix/remove-dockerhub-login-demo
40+
# (memory protocol + pr-babysit style followed).
4841

4942
# Login only on main (for push); on PR just build/test
5043
- name: Login to GitHub Container Registry
5144
if: github.event_name != 'pull_request'
52-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
45+
uses: docker/login-action@c99871dec2022cc055c062a10cc1a1310835ceb4 # v4.3.0
5346
with:
5447
registry: ghcr.io
5548
username: ${{ github.actor }}

0 commit comments

Comments
 (0)