Skip to content

Commit

Permalink
Updated workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Jan 22, 2025
1 parent 1ff8544 commit e692224
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ jobs:

build:

runs-on: ubuntu-22.04
runs-on: ${{ matrix.runner }}

strategy:
matrix:
platform: [amd64, arm64]
include:
- platform: amd64
runner: ubuntu-22.04
- platform: arm64
runner: ubuntu-22.04-arm

env:
working-directory: ./

Expand Down Expand Up @@ -67,27 +76,19 @@ jobs:
if: ${{ env.RELEASE_VERSION == 'master' }}
run: echo "RELEASE_VERSION=latest" >> $GITHUB_ENV

- name: set CPU architecture
id: set_cpu_architecture
run: echo "CPU_ARCHITECTURE=${{ matrix.platform }}" >> $GITHUB_ENV

- name: Build and push Docker OCR Service image
id: docker_build
uses: docker/build-push-action@v2
with:
context : ./
file : "./Dockerfile"
allow: network.host
github-token: ${{ github.token }}
tags: cogstacksystems/cogstack-ocr-service:${{ env.RELEASE_VERSION }}
push: true

- name: Build and push Docker OCR Service Multilanguage image
id: docker_build_multilang
uses: docker/build-push-action@v2
with:
context : ./
file : "./Dockerfile_multilang"
allow: network.host
github-token: ${{ github.token }}
tags: cogstacksystems/cogstack-ocr-service-multilang:${{ env.RELEASE_VERSION }}
push: true
run: |
docker build --platform linux/${{ matrix.platform }} -t cogstacksystems/cogstack-ocr-service:${{ env.RELEASE_VERSION }}-${{ matrix.platform }} -f Dockerfile --build-arg CPU_ARCHITECTURE=${{ matrix.platform }} .
docker push cogstacksystems/cogstack-ocr-service:${{ env.RELEASE_VERSION }}-${{ matrix.platform }}
- name: Build and push Docker OCR Service image
run: |
docker build --platform linux/${{ matrix.platform }} -t cogstacksystems/cogstack-ocr-service-multilang:${{ env.RELEASE_VERSION }}-${{ matrix.platform }} -f Dockerfile_multilang --build-arg CPU_ARCHITECTURE=${{ matrix.platform }} .
docker push cogstacksystems/cogstack-ocr-service-multilang:${{ env.RELEASE_VERSION }}-${{ matrix.platform }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit e692224

Please sign in to comment.