Skip to content

Commit f98bebe

Browse files
committed
fix: Pre-commit security issue
1 parent 7af4e19 commit f98bebe

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/docker-tools-image.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,12 @@ jobs:
5454
tags: ${{ steps.meta.outputs.tags }}
5555
labels: ${{ steps.meta.outputs.labels }}
5656

57-
- name: Extract first image tag
58-
id: extract_tag
59-
run: |
60-
echo "tag=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)" >> $GITHUB_OUTPUT
61-
6257
- name: Test Docker image
58+
env:
59+
# Use the first tag from the metadata output (branch-specific tag)
60+
IMAGE_TAG: ${{ fromJSON(steps.meta.outputs.tags)[0] }}
6361
run: |
64-
echo "Testing image: ${{ steps.extract_tag.outputs.tag }}"
65-
docker run --rm ${{ steps.extract_tag.outputs.tag }} terraform --version
66-
docker run --rm ${{ steps.extract_tag.outputs.tag }} terraform-docs --version
67-
docker run --rm ${{ steps.extract_tag.outputs.tag }} tflint --version
62+
echo "Testing image: $IMAGE_TAG"
63+
docker run --rm $IMAGE_TAG terraform --version
64+
docker run --rm $IMAGE_TAG terraform-docs --version
65+
docker run --rm $IMAGE_TAG tflint --version

0 commit comments

Comments
 (0)