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+ LIBBPF_CI_TAG : v4
25+ RUNNER_VERSION : 2.331.0
2926
3027jobs :
3128 build :
32-
33- runs-on : ubuntu-latest
29+ name : ${{ matrix.tag }}
30+ runs-on : ${{ matrix.runs_on }}
3431 permissions :
3532 contents : read
3633 packages : write
3734 # This is used to complete the identity challenge
3835 # with sigstore/fulcio when running outside of PRs.
3936 id-token : write
4037 strategy :
38+ fail-fast : false
4139 matrix :
42- ubuntu_version : [noble]
43- arch : [s390x, aarch64, x86_64]
4440 include :
45- - arch : s390x
46- dockerfile : s390x.Dockerfile
47- platform : linux/s390x
41+ - arch : x86_64
42+ dockerfile : Dockerfile
43+ platform : linux/amd64
44+ tag : main-noble-x86_64
45+ runs_on : ubuntu-latest
46+
4847 - arch : aarch64
4948 dockerfile : Dockerfile
5049 platform : linux/arm64
50+ tag : main-noble-aarch64
51+ runs_on : ubuntu-24.04-arm
52+
53+ - arch : s390x
54+ dockerfile : s390x.Dockerfile
55+ platform : linux/s390x
56+ tag : main-noble-s390x
57+ runs_on : ubuntu-latest
58+
5159 - arch : x86_64
52- dockerfile : Dockerfile
60+ dockerfile : kbuilder-debian. Dockerfile
5361 platform : linux/amd64
62+ tag : kbuilder-debian-x86_64
63+ runs_on : ubuntu-latest
64+
65+ - arch : aarch64
66+ dockerfile : kbuilder-debian.Dockerfile
67+ platform : linux/arm64
68+ tag : kbuilder-debian-aarch64
69+ runs_on : ubuntu-24.04-arm
5470
5571 steps :
72+
5673 - name : Checkout repository
57- uses : actions/checkout@v4
74+ uses : actions/checkout@v6
5875
5976 # Install the cosign tool except on PR
6077 # https://github.com/sigstore/cosign-installer
6683 run : cosign version
6784
6885 - name : Set up QEMU
86+ if : matrix.arch == 's390x'
6987 uses : docker/setup-qemu-action@v3
70- with :
71- image : tonistiigi/binfmt:qemu-v9.2.2
7288
7389 - name : Setup Docker buildx
7490 uses : docker/setup-buildx-action@v3
8399 username : ${{ github.actor }}
84100 password : ${{ secrets.GITHUB_TOKEN }}
85101
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-
107102 # Build and push Docker image with Buildx (don't push on PR)
108103 # https://github.com/docker/build-push-action
109104 - name : Build and push Docker image
@@ -113,10 +108,11 @@ jobs:
113108 context : .
114109 file : ${{ matrix.dockerfile }}
115110 push : ${{ github.event_name != 'pull_request' }}
116- tags : ${{ steps.meta.outputs.tags }}
117- labels : ${{ steps.meta.outputs.labels }}
111+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}
118112 platforms : ${{ matrix.platform }}
119- build-args : UBUNTU_VERSION=${{ matrix.ubuntu_version }}
113+ build-args : |
114+ LIBBPF_CI_TAG=${{ env.LIBBPF_CI_TAG }}
115+ RUNNER_VERSION=${{ env.RUNNER_VERSION }}
120116
121117 # Sign the resulting Docker image digest except on PRs.
122118 # This will only write to the public Rekor transparency log when the Docker
@@ -127,7 +123,6 @@ jobs:
127123 if : ${{ github.event_name != 'pull_request' }}
128124 env :
129125 COSIGN_EXPERIMENTAL : " true"
130- TAGS : ${{ steps.meta.outputs.tags }}
131126 # This step uses the identity token to provision an ephemeral certificate
132127 # against the sigstore community Fulcio instance.
133- run : cosign sign --yes ${TAGS }
128+ run : cosign sign --yes ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag } }
0 commit comments