Skip to content

Commit 79cccab

Browse files
authored
Correct docker image version for e2e tests in docker-publish workflow (#942)
* add step to extract docker image version for e2e tests in docker-publish workflow * simplify version string cleanup
1 parent d439e14 commit 79cccab

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/docker-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ jobs:
4141
needs: publish
4242
runs-on: ubuntu-latest
4343
steps:
44+
- name: determine docker image version from ref_name
45+
# We need to remove the leading "v" from version strings like "v1.2.3", but not from tags like "very-nice".
46+
# Unfortunately, we cannot do this inline but need a separate step that stores the result in outputs.
47+
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-an-output-parameter
48+
id: image-version
49+
run: |
50+
version="${{ github.ref_name }}"
51+
[[ "$version" == v[0-9]* ]] && version="${version#v}"
52+
echo "IMAGE_VERSION=$version" >> "$GITHUB_OUTPUT"
4453
- name: trigger e2e tests
4554
uses: FAIRDataTeam/github-workflows/.github/actions/repo-dispatch@v3
4655
with:
@@ -50,6 +59,6 @@ jobs:
5059
event-type: trigger-tests
5160
client-payload: |
5261
{
53-
"fdp_version": "${{ github.ref_name }}",
62+
"fdp_version": "${{ steps.image-version.outputs.IMAGE_VERSION }}",
5463
"fdp_client_version": "latest"
5564
}

0 commit comments

Comments
 (0)