diff --git a/.github/workflows/docker-build-and-publish.yaml b/.github/workflows/docker-build-and-publish.yaml index 420a9b592..2264e69c5 100644 --- a/.github/workflows/docker-build-and-publish.yaml +++ b/.github/workflows/docker-build-and-publish.yaml @@ -39,6 +39,11 @@ on: required: false default: "pipeline-${{ github.run_id }}-git-{{ sha }}" type: string + image-tag-flavor: + description: "Flavor of Docker image tags. See [docs of metadata-action](https://github.com/docker/metadata-action/blob/v5.6.1/README.md#flavor-input)" + required: false + default: "" + type: string ref: description: "Ref name to checkout" required: false @@ -64,7 +69,7 @@ on: required: true concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker-${{ inputs.image-name }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker-${{ inputs.image-name }}-${{ inputs.image-tag-flavor }} cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: @@ -119,6 +124,7 @@ jobs: event=pr,type=ref event=branch,type=ref,enable=${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }} event=tag,type=semver,pattern={{ version }} + flavor: ${{ inputs.image-tag-flavor }} env: DOCKER_METADATA_PR_HEAD_SHA: true # set correct sha for PRs diff --git a/docs/workflows/docker-build-and-publish/README.md b/docs/workflows/docker-build-and-publish/README.md index 1d87e8e77..c4bfb7520 100644 --- a/docs/workflows/docker-build-and-publish/README.md +++ b/docs/workflows/docker-build-and-publish/README.md @@ -49,18 +49,19 @@ jobs: -| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | -| ------------------- | ------- | -------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| checkout-lfs-files | boolean | false | `false` | Whether the Git checkout action should resolve LFS files or not. (Default is false) | -| checkout-submodules | string | false | `"false"` | Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. | -| docker-build-args | string | false | | List of build-time variables (see https://github.com/docker/build-push-action?tab=readme-ov-file#inputs) | -| docker-context | string | false | `"."` | The docker context. | -| docker-registry | string | false | `"docker.io"` | Host where the image should be pushed to. | -| dockerfile-path | string | false | `"./Dockerfile"` | Path to the Dockerfile. | -| image-name | string | false | `"${{ github.event.repository.name }}"` | Name of Docker image. | -| image-namespace | string | false | `"bakdata"` | Namespace of Docker image. | -| image-tag | string | false | `"pipeline-${{ github.run_id }}-git-{{ sha }}"` | Tag of Docker image. | -| ref | string | false | | Ref name to checkout | +| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | +| ------------------- | ------- | -------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| checkout-lfs-files | boolean | false | `false` | Whether the Git checkout action should resolve LFS files or not. (Default is false) | +| checkout-submodules | string | false | `"false"` | Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. | +| docker-build-args | string | false | | List of build-time variables (see https://github.com/docker/build-push-action?tab=readme-ov-file#inputs) | +| docker-context | string | false | `"."` | The docker context. | +| docker-registry | string | false | `"docker.io"` | Host where the image should be pushed to. | +| dockerfile-path | string | false | `"./Dockerfile"` | Path to the Dockerfile. | +| image-name | string | false | `"${{ github.event.repository.name }}"` | Name of Docker image. | +| image-namespace | string | false | `"bakdata"` | Namespace of Docker image. | +| image-tag | string | false | `"pipeline-${{ github.run_id }}-git-{{ sha }}"` | Tag of Docker image. | +| image-tag-flavor | string | false | | Flavor of Docker image tags. See [docs of metadata-action](https://github.com/docker/metadata-action/blob/v5.6.1/README.md#flavor-input) | +| ref | string | false | | Ref name to checkout |