Skip to content

Commit eae746a

Browse files
committed
Use DOCKER_HUB_USERNAME for Docker image namespace
Previously, the workflow used `github.repository_owner` when constructing Docker image tags, which caused push failures if the GitHub username did not match the Docker Hub username. This commit switches to using the `DOCKER_HUB_USERNAME` secret for the base tag, ensuring images are pushed to the correct Docker Hub namespace. This does not affect the official build process where both usernames are identical.
1 parent 0acc446 commit eae746a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/docker-auto-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
CONTEXT_DIR=$(echo "${CONTEXT}" | cut -d, -f1 )
109109
PARENT=$(echo "${CONTEXT}" | cut -d, -f2 | xargs)
110110
GIT_TAG=${{ steps.release_tag.outputs.version }}
111-
BASE_TAG="${{ github.repository_owner}}/"
111+
BASE_TAG="${{ secrets.DOCKER_HUB_USERNAME }}/"
112112
PARENT_IMAGE_AVAILIBILITY_INTERVAL=60
113113
MAX_ATTEMPTS=10
114114
GIT_TAG_COMMIT_SHA=$(echo $(git rev-list -n 1 $GIT_TAG))
@@ -223,7 +223,7 @@ jobs:
223223
PARENT=${PARENT/\#TAG/$GIT_TAG}
224224
fi
225225
226-
PARENT="${{ github.repository_owner }}/${PARENT}"
226+
PARENT="${{ secrets.DOCKER_HUB_USERNAME }}/${PARENT}"
227227
for i in $(seq 1 1 $MAX_ATTEMPTS)
228228
do
229229
echo "Attempt ${i}: Waiting for $PARENT to be available on Docker Hub"

0 commit comments

Comments
 (0)