From c93ea32c2e055fa31e294a9c86004f48b1075b06 Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Fri, 13 Feb 2026 15:58:16 +0100 Subject: [PATCH 1/2] actions: fix container image binary version Fixes #5 Signed-off-by: Francesco Giudici --- .github/workflows/quay.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quay.yml b/.github/workflows/quay.yml index 9b225e7..c27d477 100644 --- a/.github/workflows/quay.yml +++ b/.github/workflows/quay.yml @@ -34,7 +34,7 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} - # Craft image tags + # Craft image tags and version - name: Craft image tags id: tags run: | @@ -44,8 +44,10 @@ jobs: echo "quay.io/fgiudici/headertrace:${{ github.ref_name }}" >> $GITHUB_OUTPUT echo "quay.io/fgiudici/headertrace:latest" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT else echo "tags=quay.io/fgiudici/headertrace:${{ github.event.inputs.image-tag }}" >> $GITHUB_OUTPUT + echo "version=${{ github.event.inputs.image-tag }}" >> $GITHUB_OUTPUT fi # Build and Push @@ -58,3 +60,6 @@ jobs: platforms: linux/amd64,linux/arm64 tags: | ${{ steps.tags.outputs.tags }} + build-args: | + VERSION=${{ steps.tags.outputs.version }} + COMMIT=${{ github.sha }} From f2531561ac86bc0b8e1ecc622f9f0bfb505d9f97 Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Fri, 13 Feb 2026 16:18:41 +0100 Subject: [PATCH 2/2] Sanitize github.event.inputs.image-tag Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Francesco Giudici --- .github/workflows/quay.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quay.yml b/.github/workflows/quay.yml index c27d477..9b3e575 100644 --- a/.github/workflows/quay.yml +++ b/.github/workflows/quay.yml @@ -46,8 +46,11 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT else - echo "tags=quay.io/fgiudici/headertrace:${{ github.event.inputs.image-tag }}" >> $GITHUB_OUTPUT - echo "version=${{ github.event.inputs.image-tag }}" >> $GITHUB_OUTPUT + INPUT_TAG="${{ github.event.inputs.image-tag }}" + SAFE_TAG="${INPUT_TAG//$'\n'/}" + SAFE_TAG="${SAFE_TAG//$'\r'/}" + echo "tags=quay.io/fgiudici/headertrace:${SAFE_TAG}" >> $GITHUB_OUTPUT + echo "version=${SAFE_TAG}" >> $GITHUB_OUTPUT fi # Build and Push