Skip to content

Commit 760d57f

Browse files
chore(merge): main -> feat/notation
2 parents bd7ba25 + bd95d35 commit 760d57f

File tree

152 files changed

+7732
-6212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+7732
-6212
lines changed

.github/dependabot.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ version: 2
33
updates:
44
- package-ecosystem: "github-actions"
55
directory: "/"
6-
labels: ["area/build"]
6+
labels: ["area/ci", "dependencies"]
77
schedule:
8-
# by default this will be on a monday.
8+
# By default, this will be on a monday.
99
interval: "weekly"
10+
groups:
11+
# Group all updates together, so that they are all applied in a single PR.
12+
# Grouped updates are currently in beta and is subject to change.
13+
# xref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups
14+
ci:
15+
patterns:
16+
- "*"

.github/labels.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Configuration file to declaratively configure labels
2+
# Ref: https://github.com/EndBug/label-sync#Config-files
3+
4+
- name: area/bucket
5+
description: Bucket related issues and pull requests
6+
color: '#00b140'
7+
- name: area/git
8+
description: Git related issues and pull requests
9+
color: '#863faf'
10+
- name: area/helm
11+
description: Helm related issues and pull requests
12+
color: '#1673b6'
13+
- name: area/oci
14+
description: OCI related issues and pull requests
15+
color: '#c739ff'
16+
- name: area/storage
17+
description: Storage related issues and pull requests
18+
color: '#4b0082'
19+
- name: backport:release/v1.0.x
20+
description: To be backported to release/v1.0.x
21+
color: '#ffd700'
22+
- name: backport:release/v1.1.x
23+
description: To be backported to release/v1.1.x
24+
color: '#ffd700'

.github/workflows/backport.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: backport
2+
3+
on:
4+
pull_request_target:
5+
types: [closed, labeled]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
pull-request:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
if: github.event.pull_request.state == 'closed' && github.event.pull_request.merged && (github.event_name != 'labeled' || startsWith('backport:', github.event.label.name))
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
- name: Create backport PRs
23+
uses: korthout/backport-action@08bafb375e6e9a9a2b53a744b987e5d81a133191 # v2.1.1
24+
# xref: https://github.com/korthout/backport-action#inputs
25+
with:
26+
# Use token to allow workflows to be triggered for the created PR
27+
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
28+
# Match labels with a pattern `backport:<target-branch>`
29+
label_pattern: '^backport:([^ ]+)$'
30+
# A bit shorter pull-request title than the default
31+
pull_title: '[${target_branch}] ${pull_title}'
32+
# Simpler PR description than default
33+
pull_description: |-
34+
Automated backport to `${target_branch}`, triggered by a label in #${pull_number}.

.github/workflows/cifuzz.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: CIFuzz
1+
name: fuzz
22
on:
33
pull_request:
44
branches:
5-
- main
5+
- 'main'
6+
- 'release/**'
67
paths-ignore:
78
- 'CHANGELOG.md'
89
- 'README.md'
@@ -12,15 +13,15 @@ permissions:
1213
contents: read
1314

1415
jobs:
15-
Fuzzing:
16+
smoketest:
1617
runs-on: ubuntu-latest
1718
steps:
1819
- name: Checkout
19-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
20+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2021
- name: Setup Go
21-
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
22+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2223
with:
23-
go-version: 1.20.x
24+
go-version: 1.21.x
2425
cache-dependency-path: |
2526
**/go.sum
2627
**/go.mod

.github/workflows/e2e.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
- 'MAINTAINERS'
99
push:
1010
branches:
11-
- main
11+
- 'main'
12+
- 'release/**'
1213

1314
permissions:
1415
contents: read # for actions/checkout to fetch code
@@ -19,23 +20,23 @@ jobs:
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Checkout
22-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2324
- name: Setup Go
24-
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
25+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2526
with:
26-
go-version: 1.20.x
27+
go-version: 1.21.x
2728
cache-dependency-path: |
2829
**/go.sum
2930
**/go.mod
3031
- name: Enable integration tests
31-
# Only run integration tests for main branch
32-
if: github.ref == 'refs/heads/main'
32+
# Only run integration tests for main and release branches
33+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')
3334
run: |
3435
echo 'GO_TAGS=integration' >> $GITHUB_ENV
3536
- name: Setup Kubernetes
36-
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
37+
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
3738
with:
38-
version: v0.17.0
39+
version: v0.19.0
3940
cluster_name: kind
4041
node_image: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
4142
- name: Setup Kustomize
@@ -54,17 +55,17 @@ jobs:
5455
runs-on: [self-hosted, Linux, ARM64, equinix]
5556
steps:
5657
- name: Checkout
57-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
58+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5859
- name: Setup Go
59-
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
60+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
6061
with:
61-
go-version: 1.20.x
62+
go-version: 1.21.x
6263
cache-dependency-path: |
6364
**/go.sum
6465
**/go.mod
6566
- name: Enable integration tests
66-
# Only run integration tests for main branch
67-
if: github.ref == 'refs/heads/main'
67+
# Only run integration tests for main and release branches
68+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')
6869
run: |
6970
echo 'GO_TAGS=integration' >> $GITHUB_ENV
7071
- name: Prepare

.github/workflows/nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
18+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1919
- name: Setup QEMU
20-
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
20+
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
2121
- name: Setup Docker Buildx
2222
id: buildx
23-
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
23+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
2424
with:
2525
buildkitd-flags: "--debug"
2626
- name: Build multi-arch container image
27-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
27+
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
2828
with:
2929
push: false
3030
builder: ${{ steps.buildx.outputs.name }}

.github/workflows/release.yml

Lines changed: 82 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,29 @@ on:
77
inputs:
88
tag:
99
description: 'image tag prefix'
10-
default: 'rc'
10+
default: 'preview'
1111
required: true
1212

1313
permissions:
14-
contents: write # needed to write releases
15-
id-token: write # needed for keyless signing
16-
packages: write # needed for ghcr access
14+
contents: read
1715

1816
env:
1917
CONTROLLER: ${{ github.event.repository.name }}
2018

2119
jobs:
22-
build-push:
20+
release:
21+
outputs:
22+
hashes: ${{ steps.slsa.outputs.hashes }}
23+
image_url: ${{ steps.slsa.outputs.image_url }}
24+
image_digest: ${{ steps.slsa.outputs.image_digest }}
2325
runs-on: ubuntu-latest
26+
permissions:
27+
contents: write # for creating the GitHub release.
28+
id-token: write # for creating OIDC tokens for signing.
29+
packages: write # for pushing and signing container images.
2430
steps:
2531
- name: Checkout
26-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
32+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2733
- name: Setup Kustomize
2834
uses: fluxcd/pkg/actions/kustomize@main
2935
- name: Prepare
@@ -36,32 +42,33 @@ jobs:
3642
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
3743
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
3844
- name: Setup QEMU
39-
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
45+
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
4046
- name: Setup Docker Buildx
4147
id: buildx
42-
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
48+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
4349
- name: Login to GitHub Container Registry
44-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
50+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
4551
with:
4652
registry: ghcr.io
4753
username: fluxcdbot
4854
password: ${{ secrets.GHCR_TOKEN }}
4955
- name: Login to Docker Hub
50-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
56+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
5157
with:
5258
username: fluxcdbot
5359
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
5460
- name: Generate images meta
5561
id: meta
56-
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
62+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
5763
with:
5864
images: |
5965
fluxcd/${{ env.CONTROLLER }}
6066
ghcr.io/fluxcd/${{ env.CONTROLLER }}
6167
tags: |
6268
type=raw,value=${{ steps.prep.outputs.VERSION }}
6369
- name: Publish images
64-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
70+
id: build-push
71+
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
6572
with:
6673
sbom: true
6774
provenance: true
@@ -72,32 +79,82 @@ jobs:
7279
platforms: linux/amd64,linux/arm/v7,linux/arm64
7380
tags: ${{ steps.meta.outputs.tags }}
7481
labels: ${{ steps.meta.outputs.labels }}
75-
- name: Check images
76-
run: |
77-
docker buildx imagetools inspect docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
78-
docker buildx imagetools inspect ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
79-
docker pull docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
80-
docker pull ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
81-
- uses: sigstore/cosign-installer@9e9de2292db7abb3f51b7f4808d98f0d347a8919 # v3.0.2
82+
- uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0
8283
- name: Sign images
8384
env:
8485
COSIGN_EXPERIMENTAL: 1
8586
run: |
86-
cosign sign --yes fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
87-
cosign sign --yes ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
87+
cosign sign --yes fluxcd/${{ env.CONTROLLER }}@${{ steps.build-push.outputs.digest }}
88+
cosign sign --yes ghcr.io/fluxcd/${{ env.CONTROLLER }}@${{ steps.build-push.outputs.digest }}
8889
- name: Generate release artifacts
8990
if: startsWith(github.ref, 'refs/tags/v')
9091
run: |
9192
mkdir -p config/release
9293
kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
9394
kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
94-
echo '[CHANGELOG](https://github.com/fluxcd/${{ env.CONTROLLER }}/blob/main/CHANGELOG.md)' > ./config/release/notes.md
95-
- uses: anchore/sbom-action/download-syft@422cb34a0f8b599678c41b21163ea6088edb2624 # v0.14.1
95+
- uses: anchore/sbom-action/download-syft@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
9696
- name: Create release and SBOM
97+
id: run-goreleaser
9798
if: startsWith(github.ref, 'refs/tags/v')
98-
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
99+
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
99100
with:
100101
version: latest
101-
args: release --release-notes=config/release/notes.md --rm-dist --skip-validate
102+
args: release --clean --skip-validate
102103
env:
103104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
- name: Generate SLSA metadata
106+
id: slsa
107+
env:
108+
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
109+
run: |
110+
hashes=$(echo -E $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0)
111+
echo "hashes=$hashes" >> $GITHUB_OUTPUT
112+
113+
image_url=fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.version }}
114+
echo "image_url=$image_url" >> $GITHUB_OUTPUT
115+
116+
image_digest=${{ steps.build-push.outputs.digest }}
117+
echo "image_digest=$image_digest" >> $GITHUB_OUTPUT
118+
119+
release-provenance:
120+
needs: [release]
121+
permissions:
122+
actions: read # for detecting the Github Actions environment.
123+
id-token: write # for creating OIDC tokens for signing.
124+
contents: write # for uploading attestations to GitHub releases.
125+
if: startsWith(github.ref, 'refs/tags/v')
126+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
127+
with:
128+
provenance-name: "provenance.intoto.jsonl"
129+
base64-subjects: "${{ needs.release.outputs.hashes }}"
130+
upload-assets: true
131+
132+
dockerhub-provenance:
133+
needs: [release]
134+
permissions:
135+
actions: read # for detecting the Github Actions environment.
136+
id-token: write # for creating OIDC tokens for signing.
137+
packages: write # for uploading attestations.
138+
if: startsWith(github.ref, 'refs/tags/v')
139+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
140+
with:
141+
image: ${{ needs.release.outputs.image_url }}
142+
digest: ${{ needs.release.outputs.image_digest }}
143+
registry-username: fluxcdbot
144+
secrets:
145+
registry-password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
146+
147+
ghcr-provenance:
148+
needs: [release]
149+
permissions:
150+
actions: read # for detecting the Github Actions environment.
151+
id-token: write # for creating OIDC tokens for signing.
152+
packages: write # for uploading attestations.
153+
if: startsWith(github.ref, 'refs/tags/v')
154+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
155+
with:
156+
image: ghcr.io/${{ needs.release.outputs.image_url }}
157+
digest: ${{ needs.release.outputs.image_digest }}
158+
registry-username: fluxcdbot
159+
secrets:
160+
registry-password: ${{ secrets.GHCR_TOKEN }}

0 commit comments

Comments
 (0)