update azureContainerRegistry.name #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: Build and deploy container app to Azure Web App - benefits-navigator-newsfeed | |
on: | |
push: | |
paths: | |
- 'astro-frontend/**' | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: ./astro-frontend | |
jobs: | |
build: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: https://crdtsshared.azurecr.io/ | |
username: ${{ secrets.AzureAppService_ContainerUsername_86a88f5f1a73439da125d273abde6626 }} | |
password: ${{ secrets.AzureAppService_ContainerPassword_947ffd85d6304e2990af3a0172cbdcb9 }} | |
- name: Build and push container image to registry | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: crdtsshared.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_86a88f5f1a73439da125d273abde6626 }}/benefits-navigator-newsfeed-astro-frontend:${{ github.sha }} | |
file: ./astro-frontend/Dockerfile | |
context: './astro-frontend' | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: 'production' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- name: Deploy to Azure Web App | |
id: deploy-to-webapp | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: 'benefits-navigator-newsfeed' | |
slot-name: 'production' | |
publish-profile: ${{ secrets.AzureAppService_PublishProfile_b423d57f5bf6498bb92e3cedfde5c162 }} | |
images: 'crdtsshared.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_86a88f5f1a73439da125d273abde6626 }}/benefits-navigator-newsfeed-astro-frontend:${{ github.sha }}' |