Skip to content

Commit cbf207a

Browse files
saschagrunertk8s-ci-robot
authored andcommitted
Make nix-spoc builds a matrix
Signed-off-by: Sascha Grunert <[email protected]>
1 parent 0b99f72 commit cbf207a

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.github/workflows/build.yml

+32-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,37 @@ jobs:
5353
path: build/${{ matrix.arch }}
5454

5555
nix-spoc:
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
arch:
60+
- amd64
61+
- arm64
62+
- ppc64le
63+
runs-on: ubuntu-22.04
64+
name: nix / spoc / ${{ matrix.arch }}
65+
steps:
66+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
- uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28
68+
with:
69+
install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install
70+
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
71+
with:
72+
name: security-profiles-operator
73+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
74+
pushFilter: security-profiles-operator
75+
- run: nix-build nix/default-${{ matrix.arch }}.nix
76+
77+
nix-spoc-push:
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
arch:
82+
- amd64
83+
- arm64
84+
- ppc64le
5685
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags')
86+
name: nix / spoc / push / ${{ matrix.arch }}
5787
runs-on: ubuntu-22.04
5888
permissions:
5989
contents: write # required for updating the release
@@ -73,10 +103,10 @@ jobs:
73103
sudo curl -sSfL --retry 5 --retry-delay 3 -o /usr/bin/bom \
74104
https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux
75105
sudo chmod +x /usr/bin/bom
76-
- run: make nix-spoc
106+
- run: make nix-spoc-${{ matrix.arch }}
77107
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
78108
with:
79-
name: spoc
109+
name: spoc-${{ matrix.arch }}
80110
path: |
81111
build/*
82112
- uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0

0 commit comments

Comments
 (0)