From 6e470325fb11b346398fabad9aea22742e6cdac2 Mon Sep 17 00:00:00 2001 From: Henry Bravo Date: Sat, 22 Jun 2024 14:02:53 +0200 Subject: [PATCH] Create deploy.yml deploy app to azure --- .github/workflows/deploy.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c92f273 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Build and Push to ACR +on: + push: + branches: + - 'main' +jobs: + build: + name: 'Build and Push to ACR' + runs-on: ubuntu-latest + + defaults: + run: + shell: bash + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker Login + uses: azure/docker-login@v1 + with: + login-server: ${{ secrets.AZURE_URL }} + username: ${{ secrets.ACR_USERNAME }} + password: ${{ secrets.ACR_PASSWORD }} + + - name: Build and Push to ACR + uses: docker/build-push-action@v2 + with: + push: true + tags: ${{ secrets.IMAGE_TAG }} + file: Dockerfile