From e87d540d3b4f580c44836db46d1d6205ee07a31c Mon Sep 17 00:00:00 2001 From: Paul Abel Date: Thu, 22 Feb 2024 09:57:53 +0000 Subject: [PATCH] extract the first image tag to pass to Trivy --- .github/workflows/build-plus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-plus.yml b/.github/workflows/build-plus.yml index e4f9f9ac19..eac8c57697 100644 --- a/.github/workflows/build-plus.yml +++ b/.github/workflows/build-plus.yml @@ -236,7 +236,7 @@ jobs: - name: Extract image name for Trivy id: trivy-tag run: | - tag=$(echo $DOCKER_METADATA_OUTPUT_JSON | jq -r '.tags[] | select(contains("f5-gcs-7899"))' ) + tag=$(echo $DOCKER_METADATA_OUTPUT_JSON | jq -r '[ .tags[] | select(contains("f5-gcs-7899"))] | .[0]') echo "tag=$tag" >> $GITHUB_OUTPUT if: ${{ inputs.publish-image }}