Skip to content

Commit

Permalink
Correct latest tag check for container
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Feb 16, 2024
1 parent c64351f commit 842b3be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag $DOCKER_CONTAINER:$DOCKER_TAG
[[ "${{ github.ref }}" == "refs/heads/master" ]] && docker tag $DOCKER_CONTAINER:$DOCKER_TAG ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
[[ "${{ github.ref }}" == "refs/heads/main" ]] && docker tag $DOCKER_CONTAINER:$DOCKER_TAG ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
docker tag $DOCKER_CONTAINER:$DOCKER_TAG ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:$DOCKER_TAG
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push to GHCR
run: |
[[ "${{ github.ref }}" == "refs/heads/master" ]] && docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
[[ "${{ github.ref }}" == "refs/heads/main" ]] && docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:$DOCKER_TAG

0 comments on commit 842b3be

Please sign in to comment.