feat: long sha support (#9)

* feat: long sha support

* readme
This commit is contained in:
Adam Uhlíř 2025-04-03 10:04:34 +02:00 committed by GitHub
parent dcc268ee66
commit 7e01da7963
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,11 @@ on:
description: Set Git short commit as Docker tag
required: false
type: boolean
tag_sha_long:
default: false
description: Set Git long commit as Docker tag
required: false
type: boolean
tag_suffix:
default: ''
description: Suffix for Docker images tag
@ -68,6 +73,7 @@ env:
BUILD_ARGS: ${{ inputs.build_args }}
TAG_LATEST: ${{ inputs.tag_latest }}
TAG_SHA: ${{ inputs.tag_sha }}
TAG_SHA_LONG: ${{ inputs.tag_sha_long }}
TAG_SUFFIX: ${{ inputs.tag_suffix }}
CHECKOUT_FETCH_DEPTH: ${{ inputs.checkout-fetch-depth }}
CHECKOUT_FETCH_TAGS: ${{ inputs.checkout-fetch-tags }}
@ -219,6 +225,7 @@ jobs:
type=semver,pattern={{version}}
type=raw,enable=${{ env.TAG_RAW }},value=latest
type=sha,enable=${{ env.TAG_SHA }}
type=sha,enable=${{ env.TAG_SHA_LONG }},format=long
- name: Docker - Login to Docker Hub
uses: docker/login-action@v3

View File

@ -27,6 +27,7 @@
| `build_args` | Build arguments | `''` |
| `tag_latest` | Set latest tag for Docker images | `true` |
| `tag_sha` | Set Git short commit as Docker tag | `true` |
| `tag_sha_long` | Set Git long commit as Docker tag | `false` |
| `tag_suffix` | Suffix for Docker images tag | `''` |
| `checkout-fetch-depth` | actions/checkout fetch-depth | `''` |
| `checkout-fetch-tags` | actions/checkout fetch-tags | `''` |