Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Login and expose the token for later login
Browse files Browse the repository at this point in the history
  • Loading branch information
halprin committed Oct 16, 2023
1 parent 086c2e3 commit 474ae11
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/deploy_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,20 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Log in to registry 2
id: login-to-registry
uses: azure/CLI@v1
with:
inlineScript: |
az acr login --name ${{ inputs.REGISTRY }}
ACR2_PASSWORD=$(az acr login --name ${{ inputs.REGISTRY }} --expose-token --output tsv --query accessToken)
echo "::add-mask::$ACR2_PASSWORD"
echo "ACR2_PASSWORD=$ACR2_PASSWORD" >> "$GITHUB_OUTPUT"
- name: Log in to registry 3
uses: docker/login-action@v3
with:
registry: ${{ inputs.REGISTRY }}
username: 00000000-0000-0000-0000-000000000000
password: ${{ steps.login-to-registry.outputs.ACR2_PASSWORD }}

- name: Build and push container image to registry
uses: docker/build-push-action@v5
Expand Down

0 comments on commit 474ae11

Please sign in to comment.