File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -128,3 +128,30 @@ jobs:
128128 provenance : false
129129 secrets : |
130130 "github_token=${{ secrets.GITHUB_TOKEN }}"
131+
132+ # Build tools image using Dockerfile.tools and the just-built main image as base
133+ - name : Build tools image
134+ if : steps.changed-files-specific.outputs.any_changed == 'true'
135+ uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
136+ with :
137+ context : .
138+ file : ./Dockerfile.tools
139+ build-args : |
140+ BASE_IMAGE=${{ env.IMAGE }}
141+ push : false
142+ load : true
143+ tags : ${{ env.IMAGE }}-tools
144+ provenance : false
145+ secrets : |
146+ "github_token=${{ secrets.GITHUB_TOKEN }}"
147+
148+ # Smoke test the tools image
149+ - name : Smoke test tools image
150+ if : steps.changed-files-specific.outputs.any_changed == 'true'
151+ env :
152+ TOOLS_IMAGE : ${{ env.IMAGE }}-tools
153+ run : |
154+ echo "Testing tools image: $TOOLS_IMAGE"
155+ docker run --rm "$TOOLS_IMAGE" terraform --version
156+ docker run --rm "$TOOLS_IMAGE" terraform-docs --version
157+ docker run --rm "$TOOLS_IMAGE" tflint --version
You can’t perform that action at this time.
0 commit comments