From 635a19bba15bcf51c133c8d618ad6825a8ce287e Mon Sep 17 00:00:00 2001 From: Silvija Tovernic Date: Thu, 19 Sep 2024 17:27:15 +0200 Subject: [PATCH] add: acr test --- .github/workflows/docker-build-if-runner.yml | 25 ++++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker-build-if-runner.yml b/.github/workflows/docker-build-if-runner.yml index 26c08e5a..c17839b1 100644 --- a/.github/workflows/docker-build-if-runner.yml +++ b/.github/workflows/docker-build-if-runner.yml @@ -15,24 +15,23 @@ jobs: IMAGE_NAME: "image-factory-runner" IMAGE_TAG: "${{ github.run_number }}" IMAGE_FOLDER: "images/docker/image-factory-runner" - REGISTRY: "stovernic" steps: - 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 + - name: Log in to Azure Container Registry + uses: azure/docker-login@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} + 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 @@ -42,7 +41,7 @@ jobs: docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG - name: Tag and push Docker image as latest - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' run: | docker tag $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $REGISTRY/$IMAGE_NAME:latest docker push $REGISTRY/$IMAGE_NAME:latest