diff --git a/.github/actions/publish-docker-image/action.yml b/.github/actions/publish-docker-image/action.yml index 2f8a8c522..a252bf108 100644 --- a/.github/actions/publish-docker-image/action.yml +++ b/.github/actions/publish-docker-image/action.yml @@ -38,6 +38,9 @@ inputs: docker_token: required: false description: "DockerHub Token. No push is done if omitted" + docker_tag: + required: false + description: 'additional docker tags' runs: using: "composite" steps: @@ -72,9 +75,7 @@ runs: images: | ${{ inputs.namespace }}/${{ inputs.imagename }} tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} + type=semver,pattern={{version}},value=${{ inputs.docker_tag }} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{raw}} diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index 24aaf2ff4..e441bd63d 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -28,6 +28,9 @@ on: description: 'The namespace (=repo) in DockerHub' required: false default: "tractusx" + docker_tag: + description: 'Explicitly specify the Docker tag. Note that SHA and latest are added automatically.' + required: false concurrency: # cancel only running jobs on pull requests @@ -53,6 +56,7 @@ jobs: - uses: actions/checkout@v3.3.0 - uses: ./.github/actions/publish-docker-image with: + docker_tag: ${{ inputs.docker_tag }} rootDir: edc-controlplane/${{ matrix.name }} imagename: ${{ matrix.name }} namespace: ${{ inputs.namespace }} @@ -76,6 +80,7 @@ jobs: - uses: actions/checkout@v3.3.0 - uses: ./.github/actions/publish-docker-image with: + docker_tag: ${{ inputs.docker_tag }} rootDir: edc-dataplane/${{ matrix.name }} imagename: ${{ matrix.name }} namespace: ${{ inputs.namespace }}