Skip to content

Commit

Permalink
Managed identity azure container push.
Browse files Browse the repository at this point in the history
  • Loading branch information
shammowla committed Sep 5, 2024
1 parent 4e1dfd9 commit 4109c86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,18 @@ jobs:
echo "APP_DOMAIN=ajo.alloyio.com" >> $GITHUB_ENV
echo "COMPOSE_FILE=docker/ajo.yml" >> $GITHUB_ENV
echo "SERVICE_NAME=$(echo ${{ matrix.sample }} | sed 's/^ajo-//')" >> $GITHUB_ENV
- name: Add IP to ACR firewall
run: |
MY_IP=$(curl -s https://api.ipify.org)
az acr network-rule add --name ${{ env.ACR_NAME }} --ip-address $MY_IP
- name: Build and push Docker image
run: |
az acr build --registry ${{ env.ACR_NAME }} --image ${{ matrix.sample }}:${{ github.sha }} --file ${{ env.COMPOSE_FILE }} .
- name: Remove IP from ACR firewall
if: always()
run: |
MY_IP=$(curl -s https://api.ipify.org)
az acr network-rule remove --name ${{ env.ACR_NAME }} --ip-address $MY_IP
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
Expand Down

0 comments on commit 4109c86

Please sign in to comment.