|
61 | 61 | # For a pull request, use the name of the base branch that the PR was created against or "latest" (for main). |
62 | 62 | # e.g. PR against 'main' will use "latest". a PR against 'dspace-7_x' will use 'dspace-7_x'. |
63 | 63 | 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 }} |
66 | 67 | type=ref,event=tag |
67 | 68 | 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' }} |
68 | 69 | # Define default tag "flavor" for docker/metadata-action per |
@@ -142,8 +143,7 @@ jobs: |
142 | 143 | uses: docker/metadata-action@v5 |
143 | 144 | with: |
144 | 145 | 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 }} |
147 | 147 | flavor: ${{ env.TAGS_FLAVOR }} |
148 | 148 |
|
149 | 149 | #-------------------------------------------------------------------- |
|
0 commit comments