Fixes #15: Add Azure build and push to ACR workflow #2
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
name: ACR deployment | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
pull_request: | ||
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: ${{ secret.ACR_REGISTRY }} | ||
Check failure on line 23 in .github/workflows/azure-deployment.yml GitHub Actions / ACR deploymentInvalid workflow file
|
||
username: ${{ secret.ACR_USERNAME }} | ||
password: ${{ secret.ACR_PASSWORD}} | ||
- name: Build and push container image to registry | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: ${{ secret.ACR_REGISTRY }}/${{ github.event.repository.name }}:${{ github.sha }} | ||
file: ./Dockerfile | ||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# environment: | ||
# name: 'production' | ||
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | ||
# steps: | ||
# - name: Login to Azure Container Registry | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: testtechnique.azurecr.io | ||
# username: ${{ secrets.ACR_USERNAME }} | ||
# password: ${{ secrets.ACR_PASSWORD }} | ||
# - name: Deploy to Azure Web App | ||
# id: deploy-to-webapp | ||
# uses: azure/webapps-deploy@v2 | ||
# with: | ||
# app-name: 'TestTechniqueReda' | ||
# slot-name: 'production' | ||
# publish-profile: ${{ secrets.AzureAppService_PublishProfile_866fbed61ad74e99846ba845c9d8c11a }} | ||
# images: 'testtechnique.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_2bd1c69a565f486ba48c74f055eda8ee }}/testtechniquestage2:${{ github.sha }}' |