-
Notifications
You must be signed in to change notification settings - Fork 137
177 lines (176 loc) · 6 KB
/
Copy pathrelease-arm.yaml
File metadata and controls
177 lines (176 loc) · 6 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Release ARM artifacts
on:
push:
tags:
- v*
permissions: read-all
jobs:
core:
name: ${{ matrix.image_name }}
uses: kairos-io/kairos-factory-action/.github/workflows/reusable-factory.yaml@84ea9b020bdd470081b235a1a99147a98d32c989 # v1.1.1
secrets:
registry_username: ${{ secrets.QUAY_USERNAME }}
registry_password: ${{ secrets.QUAY_PASSWORD }}
permissions:
id-token: write # OIDC support
contents: write
security-events: write
actions: read
strategy:
fail-fast: false
matrix:
base_image:
- "ghcr.io/kairos-io/hadron:v0.0.4"
model:
- "generic"
- "rpi4"
security_scan_mode: ["enforce"]
cleanup: [true]
grype: [true]
include:
- image_name: "hadron"
base_image: "ghcr.io/kairos-io/hadron:v0.0.4"
model: "generic"
cleanup: true
grype: true
custom_job_name_format: "core-arm64-generic"
- image_name: "hadron"
base_image: "ghcr.io/kairos-io/hadron:v0.0.4"
model: "rpi4"
cleanup: true
grype: true
custom_job_name_format: "core-arm64-rpi4"
- model: "nvidia-jetson-agx-orin"
image_name: "ubuntu:22.04"
base_image: "ubuntu:22.04"
security_scan_mode: "report-only"
cleanup: true
grype: true
custom_job_name_format: ""
- model: "nvidia-jetson-orin-nx"
image_name: "ubuntu:22.04"
base_image: "ubuntu:22.04"
security_scan_mode: "report-only"
cleanup: true
grype: false # too many vulns under the L4T rootfs
custom_job_name_format: ""
with:
auroraboot_version: "v0.19.4"
dockerfile_path: "images/Dockerfile"
base_image: ${{ matrix.base_image }}
arch: "arm64"
model: ${{ matrix.model }}
version: "auto"
no_cache: true
registry_domain: "quay.io"
registry_namespace: "kairos"
grype: ${{ matrix.grype }}
grype_sarif: ${{ matrix.grype }}
trivy: true
trivy_sarif: true
security_scan_mode: ${{ matrix.security_scan_mode }}
custom_job_name_format: ${{ matrix.custom_job_name_format }}
list_release_artifacts: true
cosign: true
release: true
iso: ${{ matrix.model == 'generic' }} # only produce ISOs for generic
cleanup: ${{ matrix.cleanup }}
get-k3s-versions:
runs-on: ubuntu-latest
outputs:
kubernetes_versions: ${{ steps.get-k3s-releases.outputs.kubernetes_versions }}
steps:
- run: |
sudo apt update && sudo apt install -y jq curl
- name: Get latest k3s releases
id: get-k3s-releases
run: |
kubernetes_versions=$(curl -s https://api.github.com/repos/k3s-io/k3s/releases | jq -r '
[.[] | select(.prerelease == false and .draft == false and (.tag_name | test("rc") | not)) | .tag_name]
| map({
version: .,
minor: (split(".")[1:2]|join("")),
patch: (split(".")[2:3]|join("")|split("+")[0]),
revision: (split("+k3s")[1])
})
| group_by(.minor)
| map(sort_by([(.patch | tonumber), (.revision | tonumber)]) | reverse | .[0])
| sort_by(.minor | tonumber)
| reverse
| .[0:3]
| map(.version)
' | jq -c '.')
echo "kubernetes_versions=$kubernetes_versions" >> $GITHUB_OUTPUT
standard:
name: ${{ matrix.image_name }}
uses: kairos-io/kairos-factory-action/.github/workflows/reusable-factory.yaml@84ea9b020bdd470081b235a1a99147a98d32c989 # v1.1.1
secrets:
registry_username: ${{ secrets.QUAY_USERNAME }}
registry_password: ${{ secrets.QUAY_PASSWORD }}
needs:
- get-k3s-versions
permissions:
id-token: write # OIDC support
contents: write
security-events: write
actions: read
strategy:
fail-fast: false
matrix:
kubernetes_version: ${{ fromJson(needs.get-k3s-versions.outputs.kubernetes_versions) }}
base_image:
- "ghcr.io/kairos-io/hadron:v0.0.4"
model:
- "generic"
- "rpi4"
image_name:
- "hadron"
security_scan_mode: ["enforce"]
cleanup: [false]
grype: [true]
custom_job_name_format:
- "standard-arm64-generic-k3s"
- "standard-arm64-rpi4-k3s"
exclude:
- model: "generic"
custom_job_name_format: "standard-arm64-rpi4-k3s"
- model: "rpi4"
custom_job_name_format: "standard-arm64-generic-k3s"
include:
- model: "nvidia-jetson-agx-orin"
image_name: "ubuntu:22.04"
base_image: "ubuntu:22.04"
security_scan_mode: "report-only"
cleanup: true
grype: true
custom_job_name_format: ""
- model: "nvidia-jetson-orin-nx"
image_name: "ubuntu:22.04"
base_image: "ubuntu:22.04"
security_scan_mode: "report-only"
cleanup: true
grype: false # too many vulns under the L4T rootfs
custom_job_name_format: ""
with:
auroraboot_version: "v0.19.4"
dockerfile_path: "images/Dockerfile"
base_image: ${{ matrix.base_image }}
arch: "arm64"
model: ${{ matrix.model }}
kubernetes_version: ${{ matrix.kubernetes_version }}
kubernetes_distro: "k3s"
version: "auto"
no_cache: true
registry_domain: "quay.io"
registry_namespace: "kairos"
iso: ${{ matrix.model == 'generic' }} # only produce ISOs for generic
grype: ${{ matrix.grype }}
grype_sarif: ${{ matrix.grype }}
trivy: true
trivy_sarif: true
security_scan_mode: ${{ matrix.security_scan_mode }}
custom_job_name_format: ${{ matrix.custom_job_name_format }}
list_release_artifacts: true
cosign: true
release: true
cleanup: ${{ matrix.cleanup }}