git docker hub perm issue

This commit is contained in:
2025-09-16 15:32:17 -04:00
parent 9e5c6feb47
commit bc63d6a5a4
2 changed files with 15 additions and 7 deletions
+8 -4
View File
@@ -198,8 +198,12 @@ jobs:
run: |
echo "=== Pushing to Docker Hub ==="
# Use temporary config directory to avoid permission issues
export DOCKER_CONFIG=/tmp/docker-config-hub
mkdir -p $DOCKER_CONFIG
# Login to Docker Hub
if echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin; then
if echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker --config $DOCKER_CONFIG login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin; then
echo "✅ Docker Hub login successful"
# Tag images for Docker Hub
@@ -212,18 +216,18 @@ jobs:
# Push to Docker Hub
echo "=== Pushing latest tag to Docker Hub ==="
if timeout 300 docker push "$DOCKER_HUB_REPO:latest"; then
if timeout 300 docker --config $DOCKER_CONFIG push "$DOCKER_HUB_REPO:latest"; then
echo "✅ Latest tag pushed to Docker Hub"
echo "=== Pushing version tag to Docker Hub ==="
if timeout 180 docker push "$DOCKER_HUB_REPO:v$(cat VERSION)"; then
if timeout 180 docker --config $DOCKER_CONFIG push "$DOCKER_HUB_REPO:v$(cat VERSION)"; then
echo "✅ Version tag pushed to Docker Hub"
else
echo "⚠️ Version tag push failed"
fi
echo "=== Pushing SHA tag to Docker Hub ==="
if timeout 180 docker push "$DOCKER_HUB_REPO:${{ github.sha }}"; then
if timeout 180 docker --config $DOCKER_CONFIG push "$DOCKER_HUB_REPO:${{ github.sha }}"; then
echo "✅ SHA tag pushed to Docker Hub"
else
echo "⚠️ SHA tag push failed"