Skip to content

Commit

Permalink
Issue #154: adds platform compatibility and optional variable for pro…
Browse files Browse the repository at this point in the history
…viding path to dockerfile. Useful for devops repo
  • Loading branch information
SonOfLope committed Sep 17, 2024
1 parent ce8c184 commit d05baa7
Showing 1 changed file with 7 additions and 2 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,8 +56,9 @@ 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 }}:${{ inputs.tag }}
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 d05baa7

Please sign in to comment.