3
3
[ ![ license] ( https://img.shields.io/github/license/fluxcd/gha-workflows.svg )] ( https://github.com/fluxcd/gha-workflows/blob/main/LICENSE )
4
4
[ ![ release] ( https://img.shields.io/github/release/fluxcd/gha-workflows/all.svg )] ( https://github.com/fluxcd/gha-workflows/releases )
5
5
6
- This repository contains reusable GitHub Workflows shared across the Flux controller repositories.
6
+ This repository contains reusable GitHub Workflows and Composite Actions shared across the Flux controller repositories.
7
7
8
8
## Workflows
9
9
10
- ### Release Flux controllers
10
+ ### Release Flux controller
11
11
12
12
The [ controller-release] ( .github/workflows/controller-release.yaml ) workflow automates the release of
13
13
Flux controllers by performing the following steps:
14
14
15
- - Builds multi-arch images for ` linux/amd64 ` , ` linux/arm64 ` and ` linux/arm/v7 ` with Docker
16
- - Generates SBOMs for each architecture with Syft
17
- - Pushes the images to ` ghcr.io/fluxcd ` and ` docker.io/fluxcd `
18
- - Signs the images with Cosign and GitHub OIDC
19
- - Creates a GitHub Release with GoReleaser
20
- - Outputs metadata for SLSA attestations
15
+ - Builds multi-arch images for ` linux/amd64 ` , ` linux/arm64 ` and ` linux/arm/v7 ` with Docker.
16
+ - Generates SBOMs for each architecture with Syft.
17
+ - Pushes the images to ` ghcr.io/fluxcd ` and ` docker.io/fluxcd ` .
18
+ - Signs the images with Cosign and GitHub OIDC.
19
+ - Creates a GitHub Release with GoReleaser.
20
+ - Outputs metadata for SLSA attestations.
21
21
22
22
Example usage:
23
23
24
24
``` yaml
25
25
name : release
26
-
27
26
on :
28
27
push :
29
- tags :
30
- - ' v*'
28
+ tags : [ 'v*' ]
31
29
workflow_dispatch :
32
30
inputs :
33
31
tag :
34
32
description : ' image tag prefix'
35
33
default : ' rc'
36
34
required : false
37
-
38
35
jobs :
39
36
release :
40
37
permissions :
47
44
release-candidate-prefix : ${{ github.event.inputs.tag }}
48
45
secrets :
49
46
github-token : ${{ secrets.GITHUB_TOKEN }}
50
- dockerhub-token : ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
47
+ dockerhub-token : ${{ secrets.DOCKERHUB_TOKEN }}
51
48
` ` `
52
49
53
50
3rd-party actions used:
83
80
jobs:
84
81
backport:
85
82
permissions:
86
- contents: write
87
- pull-requests: write
83
+ contents: write # for reading and creating branches.
84
+ pull-requests: write # for creating pull requests against release branches.
88
85
uses: fluxcd/gha-workflows/.github/workflows/[email protected]
89
86
secrets:
90
87
github-token: ${{ secrets.GITHUB_TOKEN }}
112
109
jobs:
113
110
analyze:
114
111
permissions:
115
- contents: read
116
- security-events: write
112
+ contents: read # for reading the repository code.
113
+ security-events: write # for uploading the CodeQL analysis results.
117
114
uses: fluxcd/gha-workflows/.github/workflows/[email protected]
118
115
secrets:
119
116
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -140,15 +137,14 @@ name: sync-labels
140
137
on:
141
138
workflow_dispatch:
142
139
push:
143
- branches:
144
- - main
140
+ branches: [ main ]
145
141
paths:
146
142
- .github/labels.yaml
147
143
jobs:
148
144
sync-labels:
149
145
permissions:
150
- issues: write
151
- contents: read
146
+ contents: read # for reading the labels file.
147
+ issues: write # for creating and updating labels.
152
148
uses: fluxcd/gha-workflows/.github/workflows/[email protected]
153
149
with:
154
150
labels-file: .github/labels.yaml
@@ -160,6 +156,42 @@ jobs:
160
156
161
157
- [EndBug/label-sync](https://github.com/EndBug/label-sync)
162
158
159
+ # # Composite Actions
160
+
161
+ # ## Setup Kubernetes
162
+
163
+ The [setup-kubernetes](.github/actions/setup-kubernetes/action.yaml) composite action configures
164
+ the GitHub runner to build and test Flux controllers with Kubernetes Kind clusters.
165
+
166
+ Example usage :
167
+
168
+ ` ` ` yaml
169
+ name: e2e
170
+ on:
171
+ pull_request:
172
+ push:
173
+ branches: [ main ]
174
+ jobs:
175
+ kind:
176
+ runs-on: ubuntu-latest
177
+ permissions:
178
+ contents: read # for reading the repository code.
179
+ steps:
180
+ - name: Test suite setup
181
+ uses: fluxcd/gha-workflows/.github/actions/[email protected]
182
+ with:
183
+ go-version: 1.25.x
184
+ kind-version: v0.30.0
185
+ - name: Run tests
186
+ run: make test
187
+ ` ` `
188
+
189
+ 3rd-party actions used :
190
+
191
+ - [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action)
192
+ - [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action)
193
+ - [helm/kind-action](https://github.com/helm/kind-action)
194
+
163
195
# # Contributing
164
196
165
197
- The workflows must be placed in the `.github/workflows` directory and
0 commit comments