-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (61 loc) · 1.79 KB
/
container-build.yml
File metadata and controls
63 lines (61 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build, Sign, and Generate SBOM, Attestation & Provenance
on:
workflow_call:
inputs:
version:
type: string
push:
branches:
- "main"
jobs:
build:
strategy:
matrix:
component: [controller, agent, debugger]
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
permissions:
contents: read
packages: write # Pushing images to ghcr.io
id-token: write # Signing images with cosign
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Build image
uses: ./.github/actions/container-build
with:
arch: ${{ matrix.arch }}
dockerfile: package/Dockerfile.${{ matrix.component }}
image: ${{ matrix.component }}
repo: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
merge:
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: read # Access private repos
packages: write # Pushing multi-arch manifest to ghcr.io
id-token: write # Signing images with cosign
strategy:
matrix:
component: [controller, agent, debugger]
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Merge images
uses: ./.github/actions/merge-multiarch
with:
arch: amd64,arm64
image: ${{ matrix.component }}
repo: ${{ github.repository }}
tag: latest
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}