Skip to content

Commit

Permalink
add: image tag equal to run number
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvija Tovernic committed Sep 19, 2024
1 parent 420b40d commit 64b26f0
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions .github/workflows/docker-build-if-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,22 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Log in to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build Docker Image
run: echo $IMAGE_TAG

# - name: Log in to Azure Container Registry
# uses: azure/docker-login@v1
# with:
# login-server: ${{ secrets.REGISTRY }}
# username: ${{ secrets.ACR_USERNAME }}
# password: ${{ secrets.ACR_PASSWORD }}

# - name: Log in to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}

# - name: Build Docker Image
# run: docker build -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $IMAGE_FOLDER

# - name: Push Docker image
# run: |
# docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG
run: docker build -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $IMAGE_FOLDER

- name: Push Docker image
run: |
docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG

0 comments on commit 64b26f0

Please sign in to comment.