Skip to content

Commit

Permalink
feat: skip autotag passing external tag to action (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorepanichi authored Jan 2, 2024
1 parent 62f802d commit 31221ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ inputs:
default: ""
required: false

external_tag:
description: "use this provided tag instead of the having the action calculate it"
required: false

context_path:
description: "path to context directory (where the build starts)"
required: true
Expand Down Expand Up @@ -209,6 +213,7 @@ runs:
# Bump version and create git tag
- name: Bump container version and create new github tag
if: ${{ ! inputs.external_tag }}
id: bump_version
uses: mathieudutour/[email protected]
with:
Expand Down Expand Up @@ -237,6 +242,7 @@ runs:
# In some edge cases we need to prepend and/or append a string
# See "image_tag_string_suffix" or "image_tag_string_prefix" in inputs section
- name: Add optional suffix and-or prefix to docker image tag
if: ${{ ! inputs.external_tag }}
shell: bash
id: image_tag
run: |
Expand All @@ -257,7 +263,7 @@ runs:
org.opencontainers.image.title=${{ inputs.image_name }}
org.opencontainers.image.description=${{ inputs.image_description }}
tags: |
type=raw,value=${{ steps.image_tag.outputs.ver }}
type=raw,value=${{ inputs.external_tag || steps.image_tag.outputs.ver }}
- name: Build container
uses: docker/build-push-action@v3
Expand Down

0 comments on commit 31221ff

Please sign in to comment.