Skip to content

Commit

Permalink
Debug DOCKER_USERNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadow243 committed Nov 10, 2024
1 parent b695b85 commit f92c223
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/Nightly-Image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

strategy:
matrix:
Expand All @@ -38,12 +41,27 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Debug to check if secrets are accessed
# Step to check if environment variables are set
- name: Check if DOCKER_USERNAME and DOCKER_PASSWORD are set
run: |
if [ -n "$DOCKER_USERNAME" ]; then
echo "DOCKER_USERNAME is set"
else
echo "DOCKER_USERNAME is NOT set"
fi
if [ -n "$DOCKER_PASSWORD" ]; then
echo "DOCKER_PASSWORD is set"
else
echo "DOCKER_PASSWORD is NOT set"
fi
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

# Build and push the Docker image for linux/amd64 and linux/arm64
- name: Build and push Docker image
Expand All @@ -53,7 +71,7 @@ jobs:
platforms: linux/amd64,linux/arm64
file: ./docker/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/cypht-nightly:${{ matrix.php_version }}
tags: ${{ env.DOCKER_USERNAME }}/cypht-nightly:${{ matrix.php_version }}

# Log out from Docker Hub
- name: Log out from Docker Hub
Expand Down

0 comments on commit f92c223

Please sign in to comment.