Skip to content

Commit

Permalink
Using variables for registry
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlouet committed Oct 26, 2024
1 parent b2ede72 commit ad69cf6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
name: Login to Harbor
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
registry: ${{ vars.DOCKER_REGISTRY_URL }}
username: ${{ vars.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_PASS }}
-
name: Build and push
id: docker_build
env:
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY_URL }}
DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY_URL }}
DOCKER_REPOSITORY: breizhcamp/kalon
IMAGE_TAG: ${{ steps.tag_version.outputs.new_version }}
run: |
echo "$DOCKER_REGISTRY"
echo $DOCKER_REGISTRY
DOCKER_BUILDKIT=1 docker build -t $DOCKER_REGISTRY/$DOCKER_REPOSITORY:$IMAGE_TAG -t $DOCKER_REGISTRY/$DOCKER_REPOSITORY:latest .
docker push $DOCKER_REGISTRY/$DOCKER_REPOSITORY:$IMAGE_TAG
docker push $DOCKER_REGISTRY/$DOCKER_REPOSITORY:latest
Expand Down

0 comments on commit ad69cf6

Please sign in to comment.