Skip to content

Commit

Permalink
Merge pull request #155 from ai-cfia/154-as-a-devops-i-would-like-to-…
Browse files Browse the repository at this point in the history
…provide-compatibility-of-our-packages-across-platform

Issue #154: adds platform compatibility
  • Loading branch information
SonOfLope authored Sep 17, 2024
2 parents ce8c184 + 72683b2 commit dab5959
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
registry:
required: true
type: string
dockerfile-folder-path:
required: false
type: string

jobs:
build-push-image:
Expand Down Expand Up @@ -53,12 +56,13 @@ jobs:
if: github.event.pull_request.merged == false
uses: docker/build-push-action@v5
with:
context: .
context: ${{ inputs.dockerfile-folder-path || '.' }}
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ inputs.registry }}/${{ inputs.container-name }}:${{ github.event.number }}
${{ inputs.registry }}/${{ inputs.container-name }}:${{ github.event.number || github.run_number }}
${{ inputs.registry }}/${{ inputs.container-name }}:${{ inputs.tag }}
${{ inputs.registry }}/${{ inputs.container-name }}:${{ steps.extract_branch_name.outputs.clean_branch_name }}
${{ inputs.registry }}/${{ inputs.container-name }}:${{ steps.extract_branch_name.outputs.clean_branch_name || 'latest' }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new

Expand All @@ -67,8 +71,9 @@ jobs:
if: github.event.pull_request.merged == true
uses: docker/build-push-action@v5
with:
context: .
context: ${{ inputs.dockerfile-folder-path || '.' }}
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ inputs.registry }}/${{ inputs.container-name }}:${{ inputs.tag }}
${{ inputs.registry }}/${{ inputs.container-name }}:${{ github.event.pull_request.base.ref }}
Expand Down

0 comments on commit dab5959

Please sign in to comment.