From 58d9b67f9157c22cb57396d4b2c64ba01d2fd91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orell=20B=C3=BChler?= Date: Wed, 8 Nov 2023 18:57:21 +0100 Subject: [PATCH] add docker image build and push workflow --- .github/workflows/docker-image.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..87709ee --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,26 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + +env: + REGISTRY_NAME: acrakszxtpf6oksuuv2 + APP_NAME: ateleris/bazar-stt-whisper + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Log into registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY_NAME }}.azurecr.io + username: ${{ secrets.AZURE_ACR_CREDENTIALS_USER }} + password: ${{ secrets.AZURE_ACR_CREDENTIALS_PASSWORD }} + - name: Build the Docker image + run: docker build . --file Dockerfile --tag ${{ env.APP_NAME }}:${GITHUB_SHA::8} + - name: Docker image push to ACR + run: docker push ${{ env.REGISTRY_NAME }}.azurecr.io/${{ env.APP_NAME }}:${GITHUB_SHA::8}