Skip to content

Commit

Permalink
Update action.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Munkkeli authored Dec 19, 2024
1 parent 8b8d347 commit 21cc03e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ inputs:
folder:
description: 'The folder for the component'
required: true
stage:
dockerfile:
description: 'Optional name for the Dockerfile to use'
prefix:
description: 'Optional prefix to add to the built image tags'
project:
description: 'Project name for the Diploi Docker registry'
Expand Down Expand Up @@ -40,7 +42,7 @@ runs:
uses: docker/metadata-action@v4
with:
images: ${{ env.registry }}/${{ env.project }}/${{ inputs.identifier }}
flavor: suffix=${{ inputs.stage }}
tags: ${{ inputs.prefix && 'type=ref,event=branch\ntype=ref,event=branch,prefix=${{ inputs.prefix }}-' || 'type=ref,event=branch' }}

- name: 'Log in to the Diploi Container Registry'
uses: docker/login-action@v2
Expand All @@ -53,7 +55,7 @@ runs:
uses: docker/build-push-action@v6
with:
context: ${{ inputs.folder }}
file: ${{ inputs.folder }}/Dockerfile${{ inputs.stage && format('.{0}', inputs.stage) || '' }}
file: ${{ inputs.folder }}/${{ inputs.dockerfile || 'Dockerfile' }}
pull: true
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/arm64
Expand Down

0 comments on commit 21cc03e

Please sign in to comment.