33[ ![ license] ( https://img.shields.io/github/license/fluxcd/gha-workflows.svg )] ( https://github.com/fluxcd/gha-workflows/blob/main/LICENSE )
44[ ![ release] ( https://img.shields.io/github/release/fluxcd/gha-workflows/all.svg )] ( https://github.com/fluxcd/gha-workflows/releases )
55
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.
77
88## Workflows
99
10- ### Release Flux controllers
10+ ### Release Flux controller
1111
1212The [ controller-release] ( .github/workflows/controller-release.yaml ) workflow automates the release of
1313Flux controllers by performing the following steps:
1414
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.
2121
2222Example usage:
2323
2424``` yaml
2525name : release
26-
2726on :
2827 push :
29- tags :
30- - ' v*'
28+ tags : [ 'v*' ]
3129 workflow_dispatch :
3230 inputs :
3331 tag :
3432 description : ' image tag prefix'
3533 default : ' rc'
3634 required : false
37-
3835jobs :
3936 release :
4037 permissions :
4744 release-candidate-prefix : ${{ github.event.inputs.tag }}
4845 secrets :
4946 github-token : ${{ secrets.GITHUB_TOKEN }}
50- dockerhub-token : ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
47+ dockerhub-token : ${{ secrets.DOCKERHUB_TOKEN }}
5148` ` `
5249
53503rd-party actions used:
8380jobs:
8481 backport:
8582 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.
8885 uses: fluxcd/gha-workflows/.github/workflows/backport.yaml@vX.Y.Z
8986 secrets:
9087 github-token: ${{ secrets.GITHUB_TOKEN }}
112109jobs:
113110 analyze:
114111 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.
117114 uses: fluxcd/gha-workflows/.github/workflows/code-scan.yaml@vX.Y.Z
118115 secrets:
119116 github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -140,15 +137,14 @@ name: sync-labels
140137on:
141138 workflow_dispatch:
142139 push:
143- branches:
144- - main
140+ branches: [ main ]
145141 paths:
146142 - .github/labels.yaml
147143jobs:
148144 sync-labels:
149145 permissions:
150- issues: write
151- contents: read
146+ contents: read # for reading the labels file.
147+ issues: write # for creating and updating labels.
152148 uses: fluxcd/gha-workflows/.github/workflows/labels-sync.yaml@vX.Y.Z
153149 with:
154150 labels-file: .github/labels.yaml
@@ -160,6 +156,42 @@ jobs:
160156
161157- [EndBug/label-sync](https://github.com/EndBug/label-sync)
162158
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/setup-kubernetes@vX.Y.Z
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+
163195# # Contributing
164196
165197- The workflows must be placed in the `.github/workflows` directory and
0 commit comments