Skip to content

Commit 0dee897

Browse files
test(docker.yml): Adds custom_tag definition for dspace-cris-dependencies
ref: DSC-2193
1 parent 7b8bec0 commit 0dee897

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/reusable-docker-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ env:
6161
# For a pull request, use the name of the base branch that the PR was created against or "latest" (for main).
6262
# e.g. PR against 'main' will use "latest". a PR against 'dspace-7_x' will use 'dspace-7_x'.
6363
IMAGE_TAGS: |
64-
type=raw,value=latest,enable=${{ github.ref_name == github.event.repository.default_branch }}
65-
type=ref,event=branch,enable=${{ github.ref_name != github.event.repository.default_branch }}
64+
type=raw,value=${{inputs.custom_tag}},enable=${{ inputs.custom_tag && github.ref_name == github.event.repository.default_branch }}
65+
type=raw,value=latest,enable=${{ inputs.custom_tag === '' && github.ref_name == github.event.repository.default_branch }}
66+
type=ref,event=branch,enable=${{ inputs.custom_tag === '' && github.ref_name != github.event.repository.default_branch }}
6667
type=ref,event=tag
6768
type=raw,value=${{ (github.event.pull_request.base.ref == github.event.repository.default_branch && 'latest') || github.event.pull_request.base.ref }},enable=${{ github.event_name == 'pull_request' }}
6869
# Define default tag "flavor" for docker/metadata-action per
@@ -142,8 +143,7 @@ jobs:
142143
uses: docker/metadata-action@v5
143144
with:
144145
images: ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.IMAGE_NAME }}
145-
tags: |
146-
${{ inputs.custom_tag && format('type=raw,value={0}', inputs.custom_tag) || env.IMAGE_TAGS }}
146+
tags: ${{ env.IMAGE_TAGS }}
147147
flavor: ${{ env.TAGS_FLAVOR }}
148148

149149
#--------------------------------------------------------------------

0 commit comments

Comments
 (0)