File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,14 +55,15 @@ jobs:
5555 app-name : ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
5656 package : " ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/webapp01/bin/publish"
5757
58- - uses : azure/docker-login@v2
59- with :
60- login-server : ${{ env.AZURE_ACR_NAME }}.azurecr.io
61- username : ${{ secrets.REGISTRY_USERNAME }}
62- password : ${{ secrets.REGISTRY_PASSWORD }}
63- - run : |
58+ - name : ACR Login via OIDC
59+ run : az acr login --name ${{ env.AZURE_ACR_NAME }}
60+
61+ - name : Build and Push Docker Image
62+ run : |
6463 docker build ./src/webapp01 --file ./src/webapp01/Dockerfile -t ${{ env.AZURE_ACR_NAME }}.azurecr.io/webapp01:${{ github.sha }}
64+ docker tag ${{ env.AZURE_ACR_NAME }}.azurecr.io/webapp01:${{ github.sha }} ${{ env.AZURE_ACR_NAME }}.azurecr.io/webapp01:latest
6565 docker push ${{ env.AZURE_ACR_NAME }}.azurecr.io/webapp01:${{ github.sha }}
66+ docker push ${{ env.AZURE_ACR_NAME }}.azurecr.io/webapp01:latest
6667
6768 - name : Azure Web Apps Deploy
6869 uses : azure/webapps-deploy@v3
7778 # https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-and-reusable-workflows-to-achieve-slsa-v1-build-level-3
7879 container-build-publish :
7980 name : Build and Publish Container Image
80- needs : []
8181 uses : devopsabcs-engineering/devsecops-reusable-workflows/.github/workflows/container.yml@main
8282 with :
8383 # This is used for tagging the container image
You can’t perform that action at this time.
0 commit comments