diff --git a/.github/workflows/docker-reusable.yml b/.github/workflows/docker-reusable.yml index 5c6c740..221dc82 100644 --- a/.github/workflows/docker-reusable.yml +++ b/.github/workflows/docker-reusable.yml @@ -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 diff --git a/README.md b/README.md index b0e1ac1..da0dad6 100644 --- a/README.md +++ b/README.md @@ -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 | `''` |