Skip to content

Commit

Permalink
push frontend and api to dev3
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed Oct 22, 2024
1 parent 0b84613 commit bfa7f77
Showing 1 changed file with 39 additions and 38 deletions.
77 changes: 39 additions & 38 deletions .github/workflows/build-deploy-ocr.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
name: Create, publish, deploy a OCR API image

on:
workflow_dispatch:
inputs:
tag:
description: 'Version tag for new release'
required: true
push:
branches: enable-auto-scaling-tf
# workflow_dispatch:
# inputs:
# tag:
# description: 'Version tag for new release'
# required: true

env:
REGISTRY: ghcr.io
VERSION: ${{ inputs.tag }}
VERSION: bora-latest-greatest


jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase the repo name
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
# - name: Check if image exists
# id: image_check
# run: docker manifest inspect ${{ env.REGISTRY }}/${{ env.REPO }}-ocr-api:${{ env.VERSION }} > /dev/null ; echo $?
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ./OCR/
file: ./OCR/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPO }}-ocr-api:${{ env.VERSION }}
# build-and-push-image:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# attestations: write
# id-token: write
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Log in to the Container registry
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Lowercase the repo name
# run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
# # - name: Check if image exists
# # id: image_check
# # run: docker manifest inspect ${{ env.REGISTRY }}/${{ env.REPO }}-ocr-api:${{ env.VERSION }} > /dev/null ; echo $?
# - name: Build and push Docker image
# id: push
# uses: docker/build-push-action@v6
# with:
# context: ./OCR/
# file: ./OCR/Dockerfile
# push: true
# tags: ${{ env.REGISTRY }}/${{ env.REPO }}-ocr-api:${{ env.VERSION }}

deploy:
runs-on: ubuntu-latest
Expand All @@ -50,8 +52,7 @@ jobs:
packages: write
attestations: write
id-token: write
needs: build-and-push-image
environment: dev
environment: dev3
steps:
- uses: azure/login@v2
with:
Expand All @@ -66,6 +67,6 @@ jobs:
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: reportvision-ocr-dev
app-name: reportvision-ocr-dev3
images: '${{ env.REGISTRY }}/${{ env.REPO}}-ocr-api:${{ env.VERSION }}'

0 comments on commit bfa7f77

Please sign in to comment.