@@ -17,14 +17,17 @@ concurrency:
1717
1818jobs :
1919 basic :
20- runs-on : ubuntu-24.04
20+ runs-on : ${{ (matrix.arch == 'arm64' && ' ubuntu-24.04-arm') || 'ubuntu-24.04' }}
2121 strategy :
2222 fail-fast : false
2323 matrix :
2424 args :
2525 - build --release
2626 - clippy -- -D warnings
2727 - test
28+ arch :
29+ - amd64
30+ - arm64
2831 steps :
2932 - uses : actions/checkout@v4
3033 with :
@@ -57,40 +60,84 @@ jobs:
5760 ~/.cargo/registry/cache/
5861 ~/.cargo/git/db/
5962 target/
60- key : ${{ runner.os }}-cargo-${{ steps.args.outputs.args }}-${{ hashFiles('**/Cargo.lock') }}
63+ key : ${{ runner.os }}-${{ runner.arch }}- cargo-${{ steps.args.outputs.args }}-${{ hashFiles('**/Cargo.lock') }}
6164 - run : cargo ${{ matrix.args }}
6265
63- container :
66+ vars :
6467 runs-on : ubuntu-24.04
68+ outputs :
69+ tag : ${{ steps.vars.outputs.tag }}
70+ image-name : ${{ steps.vars.outputs.image-name }}
6571 steps :
6672 - uses : actions/checkout@v4
6773 with :
6874 submodules : true
75+
76+ - id : vars
77+ run : |
78+ cat << EOF >> "$GITHUB_OUTPUT"
79+ tag=$(make tag)
80+ image-name=$(make image-name)
81+ EOF
82+
83+ container :
84+ needs :
85+ - vars
86+ strategy :
87+ fail-fast : false
88+ matrix :
89+ arch :
90+ - amd64
91+ - arm64
92+ runs-on : ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }}
93+ env :
94+ FACT_TAG : ${{ needs.vars.outputs.tag }}-${{ matrix.arch }}
95+ steps :
96+ - uses : actions/checkout@v4
97+ with :
98+ submodules : true
99+
69100 - run : make image
101+
70102 - name : Login to quay.io/stackrox-io
71103 uses : docker/login-action@v3
72104 with :
73105 registry : quay.io
74106 username : ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}
75107 password : ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}
108+
76109 - run : docker push "$(make image-name)"
77110
78- tag :
111+ manifest :
79112 runs-on : ubuntu-24.04
80- outputs :
81- tag : ${{ steps.tag.outputs.tag }}
113+ needs :
114+ - container
115+ - vars
116+ env :
117+ ARCHS : amd64 arm64
82118 steps :
83- - uses : actions/checkout@v4
84- with :
85- submodules : true
86- - id : tag
87- run : echo "tag=$(make tag)" >> "$GITHUB_OUTPUT"
119+ - uses : actions/checkout@v4
120+ with :
121+ repository : stackrox/collector
122+ path : collector
123+ ref : master
124+
125+ - uses : docker/login-action@v3
126+ with :
127+ registry : quay.io
128+ username : ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}
129+ password : ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}
130+
131+ - uses : ./collector/.github/actions/create-multiarch-manifest
132+ with :
133+ base-image : ${{ needs.vars.outputs.image-name }}
134+ archs : ${{ env.ARCHS }}
88135
89136 integration-tests :
90137 needs :
91- - container
92- - tag
138+ - vars
139+ - manifest
93140 uses : ./.github/workflows/integration-tests.yml
94141 with :
95- tag : ${{ needs.tag .outputs.tag }}
142+ tag : ${{ needs.vars .outputs.tag }}
96143 secrets : inherit
0 commit comments