Skip to content

Commit bf51cd3

Browse files
authored
Push docker image to ACR (#173)
1 parent 98e34fa commit bf51cd3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/go-release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,20 @@ jobs:
101101
- name: Set up Docker Buildx
102102
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca #v3.9.0
103103

104-
- name: Log in to Docker Hub
105-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #v3.3.0
104+
- name: Azure Login with OIDC
105+
uses: azure/login@v1
106106
with:
107-
username: ${{ secrets.DOCKER_USERNAME }}
108-
password: ${{ secrets.DOCKER_PASSWORD }}
107+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
108+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
109+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
110+
111+
- name: Log in to Azure Container Registry
112+
run: az acr login --name ${{ secrets.ACR_NAME }}
109113

110114
- name: Build and push Docker image
111115
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 #v6.13.0
112116
with:
113117
context: .
114118
push: true
115-
tags: ${{ secrets.DOCKER_USERNAME }}/task-wizard:latest, ${{ secrets.DOCKER_USERNAME }}/task-wizard:${{ github.ref_name }}
119+
tags: ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:latest, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:${{ github.ref_name }}
116120
platforms: linux/amd64,linux/arm64,linux/arm/v7

0 commit comments

Comments
 (0)