Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
idoyo7 authored Aug 4, 2024
1 parent 808b0b5 commit 5a022ba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Display environment variables
run: |
echo "HARBOR_USER: $HARBOR_USER"
echo "REPO_URL: $REPO_URL"
echo "TOKEN: ${{ secrets.TOKEN }}"
- name: Log in to Harbor
run: echo ${{ secrets.TOKEN }} | docker login ${{ env.REPO_URL }} -u ${{ env.HARBOR_USER }} --password-stdin
run: |
echo "${{ secrets.TOKEN }}" | docker login "$REPO_URL" -u "$HARBOR_USER" --password-stdin
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.REPO_URL }}/test:latest
tags: $REPO_URL/test:latest

0 comments on commit 5a022ba

Please sign in to comment.