Skip to content

First release

First release #2

Workflow file for this run

name: Build and Publish Docker Image
on:
release:
types: [released]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
target: production
push: false
tags: |
"${{ vars.ACR_ADDRESS }}/${{ vars.IMAGE_NAME }}:${{ github.ref_name }}"
- name: Login to Azure ACR
uses: azure/docker-login@v1
with:
login-server: ${{ vars.ACR_ADDRESS }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Push Docker image to Azure ACR
run: docker push ${{ vars.ACR_ADDRESS }}/${{ vars.IMAGE_NAME }}:${{ github.ref_name }}