Skip to content

Commit 9290692

Browse files
committed
Replace container-structure-test GHA by binary
1 parent a2ab7ed commit 9290692

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

.github/workflows/build-image-test.yaml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ jobs:
1111
build:
1212
strategy:
1313
matrix:
14-
os:
15-
- ubuntu-latest
16-
- ubuntu-24.04-arm
14+
arch:
15+
- amd64
16+
- arm64
17+
include:
18+
- os-name: Ubuntu x64
19+
os: ubuntu-latest
20+
arch: amd64
1721

22+
- os-name: Ubuntu ARM
23+
os: ubuntu-24.04-arm
24+
arch: arm64
1825

26+
name: ${{ matrix.os-name }}
1927
runs-on: ${{ matrix.os }}
2028
steps:
2129
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -35,6 +43,7 @@ jobs:
3543
tools/*.sh
3644
3745
- name: Set IMAGE environment variable
46+
if: steps.changed-files-specific.outputs.any_changed == 'true'
3847
# Lowercase the org/repo name to allow for workflow to run in forks,
3948
# which owners have uppercase letters in username
4049
run: >-
@@ -44,6 +53,7 @@ jobs:
4453
- name: Set up Docker Buildx
4554
# yamllint disable-line rule:line-length
4655
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
56+
if: steps.changed-files-specific.outputs.any_changed == 'true'
4757

4858
- name: Build if Dockerfile changed
4959
if: steps.changed-files-specific.outputs.any_changed == 'true'
@@ -61,13 +71,27 @@ jobs:
6171
secrets: |
6272
"github_token=${{ secrets.GITHUB_TOKEN }}"
6373
74+
- name: Setup Container Structure Tests
75+
if: steps.changed-files-specific.outputs.any_changed == 'true'
76+
env:
77+
# yamllint disable-line rule:line-length
78+
# renovate: datasource=github-releases depName=container-structure-test lookupName=GoogleContainerTools/container-structure-test
79+
CST_VERSION: 1.19.3
80+
run: >-
81+
curl -L "
82+
https://github.com/GoogleContainerTools/container-structure-test/
83+
releases/download/v${CST_VERSION}/
84+
container-structure-test-linux-${{ matrix.arch }}
85+
" > container-structure-test
86+
&& chmod +x container-structure-test
87+
&& mv container-structure-test /usr/bin/
88+
6489
- name: Run structure tests
6590
if: steps.changed-files-specific.outputs.any_changed == 'true'
66-
# yamllint disable-line rule:line-length
67-
uses: plexsystems/container-structure-test-action@c0a028aa96e8e82ae35be556040340cbb3e280ca # v0.3.0
68-
with:
69-
image: ${{ env.IMAGE }}
70-
config: .github/.container-structure-test-config.yaml
91+
run: >-
92+
container-structure-test test
93+
-c .github/.spacelift-runners-container-structure-test-config.yaml
94+
-i ${{ env.IMAGE }}
7195
7296
- name: Dive - check image for waste files
7397
if: steps.changed-files-specific.outputs.any_changed == 'true'

0 commit comments

Comments
 (0)