Skip to content

Commit

Permalink
fix action regestry
Browse files Browse the repository at this point in the history
fix action regestry
  • Loading branch information
Two-Play committed Nov 27, 2024
1 parent d0d3517 commit a3720eb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
# Docker Login
- name: Log in to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -41,9 +41,13 @@ jobs:
VERSION=$TAG
LOWERCASE_REPO=$repository
echo "tag=$TAG"
echo "Building Docker image $IMAGE_NAME:$VERSION"
# Build Image
docker build -t $IMAGE_NAME:latest -t $IMAGE_NAME:$VERSION .
echo "Tagging Docker image latest"
docker tag $IMAGE_NAME:latest ghcr.io/$LOWERCASE_REPO:latest
echo "Tagging Docker image $VERSION"
docker tag $IMAGE_NAME:$VERSION ghcr.io/$LOWERCASE_REPO:$VERSION
# Push to DockerHub
Expand Down

0 comments on commit a3720eb

Please sign in to comment.