1111 push :
1212 branches :
1313 - main
14- - staging
15- # Publish semver tags as releases.
16- tags : [ 'v*.*.*' ]
1714 pull_request :
1815 branches :
1916 - main
20- - staging
2117 workflow_dispatch :
2218
2319env :
2420 # Use docker.io for Docker Hub if empty
2521 REGISTRY : ghcr.io
2622 # github.repository as <account>/<repo>
2723 IMAGE_NAME : ${{ github.repository }}
28-
24+ RUNNER_VERSION : 2.331.0
2925
3026jobs :
3127 build :
32-
33- runs-on : ubuntu-latest
28+ name : ${{ matrix.tag }}
29+ runs-on : ${{ matrix.runs_on }}
3430 permissions :
3531 contents : read
3632 packages : write
3733 # This is used to complete the identity challenge
3834 # with sigstore/fulcio when running outside of PRs.
3935 id-token : write
4036 strategy :
37+ fail-fast : false
4138 matrix :
42- ubuntu_version : [noble]
43- arch : [s390x, aarch64, x86_64]
4439 include :
45- - arch : s390x
46- dockerfile : s390x.Dockerfile
47- platform : linux/s390x
40+ - arch : x86_64
41+ dockerfile : Dockerfile
42+ platform : linux/amd64
43+ tag : main-noble-x86_64
44+ runs_on : ubuntu-latest
45+
4846 - arch : aarch64
4947 dockerfile : Dockerfile
5048 platform : linux/arm64
49+ tag : main-noble-aarch64
50+ runs_on : ubuntu-24.04-arm
51+
52+ - arch : s390x
53+ dockerfile : s390x.Dockerfile
54+ platform : linux/s390x
55+ tag : main-noble-s390x
56+ runs_on : ubuntu-latest
57+
5158 - arch : x86_64
52- dockerfile : Dockerfile
59+ dockerfile : kbuilder-debian. Dockerfile
5360 platform : linux/amd64
61+ tag : kbuilder-debian-x86_64
62+ runs_on : ubuntu-latest
63+
64+ - arch : aarch64
65+ dockerfile : kbuilder-debian.Dockerfile
66+ platform : linux/arm64
67+ tag : kbuilder-debian-aarch64
68+ runs_on : ubuntu-24.04-arm
5469
5570 steps :
71+
5672 - name : Checkout repository
57- uses : actions/checkout@v4
73+ uses : actions/checkout@v6
5874
5975 # Install the cosign tool except on PR
6076 # https://github.com/sigstore/cosign-installer
6682 run : cosign version
6783
6884 - name : Set up QEMU
85+ if : matrix.arch == 's390x'
6986 uses : docker/setup-qemu-action@v3
70- with :
71- image : tonistiigi/binfmt:qemu-v9.2.2
7287
7388 - name : Setup Docker buildx
7489 uses : docker/setup-buildx-action@v3
8398 username : ${{ github.actor }}
8499 password : ${{ secrets.GITHUB_TOKEN }}
85100
86- # Extract metadata (tags, labels) for Docker
87- # https://github.com/docker/metadata-action
88- - name : Extract Docker metadata
89- id : meta
90- uses : docker/metadata-action@v5
91- with :
92- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
93- flavor : |
94- latest=auto
95- prefix=
96- suffix=-${{ matrix.ubuntu_version }}-${{ matrix.arch }}
97- tags : |
98- # Generate old tag names (e.g main-s390x, main-x86_64...) when building noble
99- # branch event
100- type=ref,enable=${{ matrix.ubuntu_version == 'noble' }},suffix=-${{ matrix.arch }},event=branch
101- # pr event
102- type=ref,enable=${{ matrix.ubuntu_version == 'noble' }},prefix=pr-,suffix=-${{ matrix.arch }},event=pr
103- # tags for all pr/branches
104- type=ref,event=branch,enable=true,priority=600
105- type=ref,event=pr,enable=true,prefix=pr-,priority=600
106-
107101 # Build and push Docker image with Buildx (don't push on PR)
108102 # https://github.com/docker/build-push-action
109103 - name : Build and push Docker image
@@ -113,10 +107,9 @@ jobs:
113107 context : .
114108 file : ${{ matrix.dockerfile }}
115109 push : ${{ github.event_name != 'pull_request' }}
116- tags : ${{ steps.meta.outputs.tags }}
117- labels : ${{ steps.meta.outputs.labels }}
110+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}
118111 platforms : ${{ matrix.platform }}
119- build-args : UBUNTU_VERSION =${{ matrix.ubuntu_version }}
112+ build-args : RUNNER_VERSION =${{ env.RUNNER_VERSION }}
120113
121114 # Sign the resulting Docker image digest except on PRs.
122115 # This will only write to the public Rekor transparency log when the Docker
@@ -127,7 +120,6 @@ jobs:
127120 if : ${{ github.event_name != 'pull_request' }}
128121 env :
129122 COSIGN_EXPERIMENTAL : " true"
130- TAGS : ${{ steps.meta.outputs.tags }}
131123 # This step uses the identity token to provision an ephemeral certificate
132124 # against the sigstore community Fulcio instance.
133- run : cosign sign --yes ${TAGS }
125+ run : cosign sign --yes ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag } }
0 commit comments