Skip to content

Commit

Permalink
try outcomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed Oct 8, 2024
1 parent 2b5c20d commit e819775
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/build-publish-ocr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ inputs:
token:
description: Github Token
required: true

registered:
description: image registered or not
required: true
runs:
using: composite
steps:
Expand All @@ -28,7 +30,7 @@ runs:
run: docker manifest inspect ${{ env.REGISTRY }}/${{ env.REPO }}-ocr-api:${{ env.VERSION }} > /dev/null ; echo $?
- name: Build and push Docker image
id: push
if: steps.image_check.outcome == 1
if: ${{ inputs.registered }} == 1
uses: docker/build-push-action@v6
with:
context: ./OCR/
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,21 @@ env:
jobs:
build_publish_ocr:
runs-on: ubuntu-latest
outputs:
register_outcome: ${{ steps.image_check.outcome }}
steps:
- uses: actions/checkout@v4
- 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 backend
uses: ./.github/actions/build-publish-ocr
with:
deploy_env: ${{ env.deploy_env }}
token: ${{ secrets.GITHUB_TOKEN }}
registered: ${{ steps.image_check.outputs.register_outcome }}

# build_frontend:
# runs-on: ubuntu-latest
Expand Down

0 comments on commit e819775

Please sign in to comment.