Skip to content

Commit e9992e3

Browse files
authored
Merge pull request #1897 from fluxcd/backport-fix-release-v1.7.x
[release/v1.7.x] Fix release workflow
2 parents 8a977b0 + 9e8e2c4 commit e9992e3

File tree

11 files changed

+120
-413
lines changed

11 files changed

+120
-413
lines changed

.github/workflows/backport.yaml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,12 @@
11
name: backport
2-
32
on:
43
pull_request_target:
54
types: [closed, labeled]
6-
7-
permissions:
8-
contents: read
9-
105
jobs:
11-
pull-request:
12-
runs-on: ubuntu-latest
6+
backport:
137
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20-
with:
21-
ref: ${{ github.event.pull_request.head.sha }}
22-
- name: Create backport PRs
23-
uses: korthout/backport-action@ca4972adce8039ff995e618f5fc02d1b7961f27a # v3.3.0
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}.
8+
contents: write # for reading and creating branches.
9+
pull-requests: write # for creating pull requests against release branches.
10+
uses: fluxcd/gha-workflows/.github/workflows/[email protected]
11+
secrets:
12+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cifuzz.yaml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,16 @@ on:
44
branches:
55
- 'main'
66
- 'release/**'
7-
paths-ignore:
8-
- 'CHANGELOG.md'
9-
- 'README.md'
10-
- 'MAINTAINERS'
11-
12-
permissions:
13-
contents: read
14-
157
jobs:
168
smoketest:
179
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read # for reading the repository code.
1812
steps:
19-
- name: Checkout
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21-
- name: Setup Go
22-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
13+
- name: Test suite setup
14+
uses: fluxcd/gha-workflows/.github/actions/[email protected]
2315
with:
2416
go-version: 1.25.x
25-
cache-dependency-path: |
26-
**/go.sum
27-
**/go.mod
2817
- name: Smoke test Fuzzers
2918
run: make fuzz-smoketest
3019
env:

.github/workflows/e2e.yaml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,28 @@
11
name: e2e
2-
32
on:
43
workflow_dispatch:
54
pull_request:
6-
branches:
7-
- 'main'
8-
- 'release/**'
95
push:
106
branches:
117
- 'main'
128
- 'release/**'
13-
14-
permissions:
15-
contents: read # for actions/checkout to fetch code
16-
179
jobs:
18-
1910
kind-linux-amd64:
2011
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read # for reading the repository code.
2114
steps:
22-
- name: Checkout
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24-
- name: Setup Go
25-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
15+
- name: Test suite setup
16+
uses: fluxcd/gha-workflows/.github/actions/[email protected]
2617
with:
2718
go-version: 1.25.x
28-
cache-dependency-path: |
29-
**/go.sum
30-
**/go.mod
19+
- name: Verify
20+
run: make verify
3121
- name: Enable integration tests
3222
# Only run integration tests for main and release branches
3323
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')
3424
run: |
3525
echo 'GO_TAGS=integration' >> $GITHUB_ENV
36-
- name: Setup Kubernetes
37-
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
38-
with:
39-
cluster_name: kind
40-
- name: Setup Kustomize
41-
uses: fluxcd/pkg/actions/kustomize@main
42-
- name: Setup Helm
43-
uses: fluxcd/pkg/actions/helm@main
4426
- name: Run E2E tests
4527
env:
4628
SKIP_COSIGN_VERIFICATION: true

.github/workflows/nightly.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'image tag prefix'
10+
default: 'rc'
11+
required: true
12+
jobs:
13+
release:
14+
permissions:
15+
contents: write # for creating the GitHub release.
16+
id-token: write # for creating OIDC tokens for signing.
17+
packages: write # for pushing and signing container images.
18+
uses: fluxcd/gha-workflows/.github/workflows/[email protected]
19+
with:
20+
controller: ${{ github.event.repository.name }}
21+
release-candidate-prefix: ${{ github.event.inputs.tag }}
22+
secrets:
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
dockerhub-token: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
25+
release-provenance:
26+
needs: [release]
27+
permissions:
28+
actions: read # for detecting the Github Actions environment.
29+
id-token: write # for creating OIDC tokens for signing.
30+
contents: write # for uploading attestations to GitHub releases.
31+
if: startsWith(github.ref, 'refs/tags/v')
32+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
33+
with:
34+
provenance-name: "provenance.intoto.jsonl"
35+
base64-subjects: "${{ needs.release.outputs.release-digests }}"
36+
upload-assets: true
37+
dockerhub-provenance:
38+
needs: [release]
39+
permissions:
40+
contents: read # for reading the repository code.
41+
actions: read # for detecting the Github Actions environment.
42+
id-token: write # for creating OIDC tokens for signing.
43+
packages: write # for uploading attestations.
44+
if: startsWith(github.ref, 'refs/tags/v')
45+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
46+
with:
47+
image: ${{ needs.release.outputs.image-name }}
48+
digest: ${{ needs.release.outputs.image-digest }}
49+
registry-username: ${{ github.repository_owner == 'fluxcd' && 'fluxcdbot' || github.repository_owner }}
50+
secrets:
51+
registry-password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
52+
ghcr-provenance:
53+
needs: [release]
54+
permissions:
55+
contents: read # for reading the repository code.
56+
actions: read # for detecting the Github Actions environment.
57+
id-token: write # for creating OIDC tokens for signing.
58+
packages: write # for uploading attestations.
59+
if: startsWith(github.ref, 'refs/tags/v')
60+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
61+
with:
62+
image: ghcr.io/${{ needs.release.outputs.image-name }}
63+
digest: ${{ needs.release.outputs.image-digest }}
64+
registry-username: fluxcdbot # not necessary for ghcr.io
65+
secrets:
66+
registry-password: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)