From dfaabbf3b4dfb198b2d631a243399c41bfbb396f Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 3 Oct 2024 10:49:47 -0600 Subject: [PATCH] try deploying to app-service right after build --- .github/workflows/build-deploy-ocr.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-deploy-ocr.yml b/.github/workflows/build-deploy-ocr.yml index 0f94d9f3..430aa681 100644 --- a/.github/workflows/build-deploy-ocr.yml +++ b/.github/workflows/build-deploy-ocr.yml @@ -6,7 +6,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + # IMAGE_NAME: ${{ github.repository }} # VERSION: ${{ inputs.tag }} VERSION: test-deploy-1 @@ -27,14 +27,8 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ocr-api - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{version}},value=${{ env.VERSION }} + - name: Lowercase the repo name + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} - name: Build and push Docker image id: push uses: docker/build-push-action@v6 @@ -42,7 +36,7 @@ jobs: context: ./OCR/ file: ./OCR/Dockerfile push: true - tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION }} + tags: ghcr.io/${{ env.REPO }}:${{ env.VERSION }} - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: @@ -64,5 +58,5 @@ jobs: with: app-name: reportvision-ocr-api-dev publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - images: 'ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION }}' + images: 'ghcr.io/${{ env.REPO}}:${{ env.VERSION }}'