From fb0f9b8aa7e0df52c2c3419fe64b8924dfe419bf Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Wed, 20 Nov 2024 15:51:09 -0800 Subject: [PATCH] ci: fix container image name when multiple given when this is workflow triggered by a tag push event, then it tags the image in multiple ways eg: "image.name": "ghcr.io/px4/px4-dev:v1.16.0-alpha1,ghcr.io/px4/px4-dev:latest" Having multiple names messes up the exectuion of the next step in the chain since we depend on its name to complete the testing --- .github/workflows/dev_container.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev_container.yml b/.github/workflows/dev_container.yml index de89addaea42..5cb9bd7be6a2 100644 --- a/.github/workflows/dev_container.yml +++ b/.github/workflows/dev_container.yml @@ -62,10 +62,15 @@ jobs: cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }} cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max + - name: Get Tag Name + id: tag_name + run: | + echo "::set-output name=tag_name::$(echo '${{ fromJSON(steps.docker.outputs.metadata)['image.name'] }}' | sed 's/,.*$//')" + - name: make quick_check uses: addnab/docker-run-action@v3 with: - image: ${{ fromJSON(steps.docker.outputs.metadata)['image.name'] }} + image: ${{ steps.tag_name.outputs.tag_name }} options: -v ${{ github.workspace }}:/workspace run: | cd /workspace