Skip to content

Fixes #15: Add Azure build and push to ACR workflow #2

Fixes #15: Add Azure build and push to ACR workflow

Fixes #15: Add Azure build and push to ACR workflow #2

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

View workflow run for this annotation

GitHub Actions / ACR deployment

Invalid workflow file

The workflow is not valid. .github/workflows/azure-deployment.yml (Line: 23, Col: 19): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.ACR_REGISTRY .github/workflows/azure-deployment.yml (Line: 24, Col: 19): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.ACR_USERNAME
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 }}'