Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): matchConditions added in Validating & MutatingWebhookConfiguration #3100

Closed
wants to merge 86 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
58a5d3a
feat(helm): matchConditions added in Validating & MutatingWebhookConf…
Oct 23, 2023
ff4c6b4
chore: replacements used
Oct 23, 2023
a0cf7b0
chore: values added
Oct 23, 2023
56e018e
Merge branch 'open-policy-agent:master' into master
leewoobin789 Nov 22, 2023
5e9945f
Merge branch 'master' into master
leewoobin789 Nov 30, 2023
982d3a5
fix: log panic in am (#3174)
acpana Nov 30, 2023
9cf91f9
chore: auto tagging after release pr is merged (#3135)
JaydipGabani Dec 1, 2023
7dc61f8
docs: automate installation docs to point to tag (#3178)
sozercan Dec 1, 2023
bd75c0c
chore: bump the all group with 5 updates (#3182)
dependabot[bot] Dec 2, 2023
7fed17f
fix: disable psp as default (#3179)
ritazh Dec 5, 2023
5a0b9e8
chore: bump golang from `26c7537` to `fe69f48` in /build/tooling (#3148)
dependabot[bot] Dec 13, 2023
49cca3b
chore: bump golang from `26c7537` to `fe69f48` in /test/image (#3150)
dependabot[bot] Dec 13, 2023
bd3992d
docs: Update install.md (#3191)
Asya-kawai Dec 29, 2023
31319be
docs: update repo env var (#3203)
ritazh Jan 3, 2024
6228648
chore: fix golanglint, checkout prior to setup-go (#3206)
apeabody Jan 6, 2024
28e64df
chore: bump the all group with 5 updates (#3207)
dependabot[bot] Jan 8, 2024
a904e90
chore: bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#3197)
dependabot[bot] Jan 8, 2024
10802d3
test: bump dapr to 1.12 (#3108)
sozercan Jan 9, 2024
54c57c1
chore: bump golang from `fe69f48` to `ca78a56` in /test/image (#3196)
dependabot[bot] Jan 9, 2024
54246ea
chore: bump golang from `fe69f48` to `ca78a56` in /build/tooling (#3194)
dependabot[bot] Jan 9, 2024
5ab7e03
chore: bump github.com/containerd/containerd from 1.7.6 to 1.7.11 (#3…
dependabot[bot] Jan 9, 2024
5bae9e2
chore: bump kubectl from v1.28.3 to v1.29.0 (#3193)
dependabot[bot] Jan 9, 2024
8fa5ae8
chore: bump follow-redirects from 1.14.9 to 1.15.4 in /website (#3208)
dependabot[bot] Jan 9, 2024
baa4d81
chore: bump cloud.google.com/go/trace from 1.10.2 to 1.10.4 (#3149)
dependabot[bot] Jan 9, 2024
f14d243
chore: bump github.com/docker/docker from 24.0.6+incompatible to 24.0…
dependabot[bot] Jan 9, 2024
9a9cad3
chore: bump clsx from 1.2.1 to 2.1.0 in /website (#3204)
dependabot[bot] Jan 9, 2024
b7d0959
chore: bump the k8s group with 3 updates (#3209)
dependabot[bot] Jan 11, 2024
b5ae5cf
chore: bump framework to 18fa1fc7dc06 (#3211)
ritazh Jan 12, 2024
a7035b8
docs: syncset docs (#3202)
acpana Jan 15, 2024
5e1903d
chore: moving to otel from opencensus (#3011)
JaydipGabani Jan 18, 2024
352f7a5
chore: bump golang from `1e3c713` to `6ac4c35` in /build/tooling (#3221)
dependabot[bot] Jan 18, 2024
3189d28
chore: bump golang from `1e3c713` to `6ac4c35` in /test/image (#3220)
dependabot[bot] Jan 18, 2024
6e41ddd
chore: bump the k8s group with 2 updates (#3226)
dependabot[bot] Jan 18, 2024
faa11d2
chore: bump kubectl from v1.29.0 to v1.29.1 (#3232)
dependabot[bot] Jan 22, 2024
d00d450
chore: bump golang from `6ac4c35` to `adf7ccb` in /build/tooling (#3233)
dependabot[bot] Jan 22, 2024
54ec9db
chore: bump golang from `6ac4c35` to `adf7ccb` in /test/image (#3231)
dependabot[bot] Jan 22, 2024
9bc7851
chore: bump golang from `adf7ccb` to `47fa179` in /build/tooling (#3238)
dependabot[bot] Jan 29, 2024
bda7bbd
chore: bump golang from `adf7ccb` to `47fa179` in /test/image (#3236)
dependabot[bot] Jan 29, 2024
5fbaef6
docs: add docs on how to contribute templates (#3242)
salaxander Jan 29, 2024
4c86a8f
chore: Setting pubsub annotations using --set in makefile (#3160)
JaydipGabani Jan 31, 2024
f3c8613
fix: fixing panic in debug log (#3244)
JaydipGabani Jan 31, 2024
b0fdea4
fix: fixing panic in error log (#3246)
JaydipGabani Jan 31, 2024
6252275
docs: add request input struct (#3234)
salaxander Feb 1, 2024
132500e
feat: Update audit and controller manager with pod labels (#3240)
Feb 6, 2024
6a4abac
ci: removing auto tagging workflow (#3257)
JaydipGabani Feb 7, 2024
3991add
chore: Prepare v3.16.0-beta.0 release (#3256)
github-actions[bot] Feb 7, 2024
6f0c3d9
ci: running ci with gatekeeper debug logs (#3260)
JaydipGabani Feb 7, 2024
7faf4c9
fix: Remove validation of constraint template rego (#3262)
mzkhan Feb 14, 2024
88ecb8c
ci: bump k8s matrix (#3267)
sozercan Feb 15, 2024
188ce2c
chore: bump kubectl from v1.29.1 to v1.29.2 (#3273)
dependabot[bot] Feb 21, 2024
644319b
chore: Upgrade controller-runtime to 0.17.2, remove fork (#3278)
maxsmythe Feb 22, 2024
5a8b71e
ci: fix license lint (#3279)
sozercan Feb 22, 2024
4db1662
fix #3261 Sort constraint status audit results (#3277)
prachirp Feb 22, 2024
0d430f2
chore: bump the k8s group with 4 updates (#3280)
dependabot[bot] Feb 22, 2024
69d6800
chore: bump oras.land/oras-go from 1.2.4 to 1.2.5 (#3239)
dependabot[bot] Feb 22, 2024
a4d077a
chore: bump the all group with 10 updates (#3281)
dependabot[bot] Feb 22, 2024
d390e3c
feat: add disableAudit helm option (#3270)
DorB-P Feb 22, 2024
08329ee
chore: bump cloud.google.com/go/trace from 1.10.4 to 1.10.5 (#3254)
dependabot[bot] Feb 22, 2024
79c3fa5
feat: vap generation (#3266)
ritazh Feb 26, 2024
04c97ea
ci: pointing to correct versioned yaml on website creation (#3258)
JaydipGabani Feb 28, 2024
68b2046
chore: bump the all group with 4 updates (#3292)
dependabot[bot] Feb 28, 2024
39c0eaa
docs: document constraint match.source (#3291)
sozercan Feb 29, 2024
73bfe89
fix: update unit test for vap generation; add custom assets for envte…
ritazh Feb 29, 2024
6879bb4
chore: bump github.com/golang/protobuf from 1.5.3 to 1.5.4 (#3301)
dependabot[bot] Mar 12, 2024
d998928
fix: fixing metrics views (#3307)
JaydipGabani Mar 15, 2024
8e99326
chore: bump kubectl from v1.29.2 to v1.29.3 (#3317)
dependabot[bot] Mar 18, 2024
376ef1f
chore: bump the k8s group with 4 updates (#3318)
dependabot[bot] Mar 18, 2024
8f2f418
chore: bump the all group with 4 updates (#3313)
dependabot[bot] Mar 18, 2024
960d2f8
chore: bump follow-redirects from 1.15.4 to 1.15.6 in /website (#3316)
dependabot[bot] Mar 18, 2024
2952590
chore: bump google.golang.org/grpc from 1.61.0 to 1.61.1 (#3285)
dependabot[bot] Mar 18, 2024
c78b647
chore: Prepare v3.16.0-beta.1 release (#3306)
github-actions[bot] Mar 19, 2024
2428c63
fix: store constraint status audit results in sorted order (#3293)
prachirp Mar 20, 2024
0a5ae29
chore: bump github.com/docker/docker from 25.0.1+incompatible to 25.0…
dependabot[bot] Mar 20, 2024
7daf00a
chore: bump cloud.google.com/go/trace from 1.10.5 to 1.10.6 (#3319)
dependabot[bot] Mar 20, 2024
7b9dd70
chore: bump frameworks to 359cf1b (#3326)
sozercan Mar 20, 2024
62525f2
chore: bump github.com/docker/docker from 25.0.2+incompatible to 25.0…
dependabot[bot] Mar 20, 2024
c92d19d
docs: fix go install gator (#3325)
sozercan Mar 22, 2024
2ea9a6b
chore: bump webpack-dev-middleware from 5.3.1 to 5.3.4 in /website (#…
dependabot[bot] Mar 26, 2024
b5eedf4
chore: bump express from 4.18.1 to 4.19.2 in /website (#3334)
dependabot[bot] Mar 26, 2024
b67b5f6
feat: enable vap in helm (#3329)
ritazh Mar 26, 2024
08526ce
docs: update opa version in readme (#3330)
ritazh Mar 26, 2024
d5a4c65
fix: over-restrictive validation of wildcard match patterns (#3310)
bencouture Mar 27, 2024
dae7514
chore: bump to go 1.22 bookworm (#3323)
sozercan Mar 27, 2024
1dd8ed1
chore: update lint (#3338)
sozercan Mar 28, 2024
95c9861
feat: Enable toggling of deferring to VAP (#3335)
maxsmythe Mar 28, 2024
50e0ce7
feat(helm): matchConditions added in Validating & MutatingWebhookConf…
Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

Expand All @@ -28,22 +28,22 @@ jobs:
issue_number: ${{ github.event.issue.number }}

- name: Update status
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.issue.number }}
body: |
[Running benchmark here...](${{ github.server.url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})

- name: Check out base code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3.5.2
with:
ref: ${{ github.base_ref }}

- name: Run benchmarks on base ref
run: make benchmark-test BENCHMARK_FILE_NAME="../base_benchmarks.txt"

- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3.5.2

- name: Run benchmark with incoming changes
run: make benchmark-test BENCHMARK_FILE_NAME="pr_benchmarks.txt"
Expand All @@ -61,7 +61,7 @@ jobs:
echo '$delimiter' >> $GITHUB_OUTPUT

- name: Create commit comment
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.issue.number }}
body: |
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/check-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: check-manifest
on:
push:
paths-ignore:
- ".github/workflows/website.yaml"
- "docs/**"
- "library/**"
- "demo/**"
- "deprecated/**"
- "example/**"
- "website/**"
- "**.md"
- "!cmd/build/helmify/static/README.md"
pull_request:
paths-ignore:
- ".github/workflows/website.yaml"
- "docs/**"
- "library/**"
- "demo/**"
- "deprecated/**"
- "example/**"
- "website/**"
- "**.md"
- "!cmd/build/helmify/static/README.md"

permissions: read-all

jobs:
check_manifest:
name: "Check codegen and manifest"
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.22"
check-latest: true
- name: Check go.mod and manifests
run: |
# there should be no additional manifest or go.mod changes
go mod tidy
git diff --exit-code
make generate manifests
git diff --exit-code
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633

- name: Initialize CodeQL
uses: github/codeql-action/init@49abf0ba24d0b7953cb586944e918a0b92074c80
uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@49abf0ba24d0b7953cb586944e918a0b92074c80
uses: github/codeql-action/autobuild@3ab4101902695724f9365a384f86c1074d94e18c

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@49abf0ba24d0b7953cb586944e918a0b92074c80
uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c
6 changes: 3 additions & 3 deletions .github/workflows/dapr-pubsub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
DAPR_VERSION: ["1.10"]
DAPR_VERSION: ["1.12"]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633

- name: Bootstrap e2e
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
kind load docker-image --name kind gatekeeper-e2e:latest gatekeeper-crds:latest
kubectl create ns gatekeeper-system
make e2e-publisher-deploy
make e2e-helm-deploy HELM_REPO=gatekeeper-e2e HELM_CRD_REPO=gatekeeper-crds HELM_RELEASE=latest ENABLE_PUBSUB=true
make e2e-helm-deploy HELM_REPO=gatekeeper-e2e HELM_CRD_REPO=gatekeeper-crds HELM_RELEASE=latest ENABLE_PUBSUB=true LOG_LEVEL=DEBUG
make test-e2e ENABLE_PUBSUB_TESTS=1

- name: Save logs
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
Expand All @@ -14,14 +14,14 @@ permissions:

jobs:
dependency-review:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3.5.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4.1.3
10 changes: 6 additions & 4 deletions .github/workflows/license-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
- "go.mod"
- "go.sum"
- "vendor/**"
- "third_party/k8s.io/kubernetes/hack/verify-licenses.sh"
pull_request:
paths:
- "go.mod"
- "go.sum"
- "vendor/**"
- "third_party/k8s.io/kubernetes/hack/verify-licenses.sh"

permissions:
contents: read
Expand All @@ -23,18 +25,18 @@ jobs:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.21"
go-version: "1.22"
check-latest: true

- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3.5.2

- name: license-lint
run: |
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: lint

on:
push:
branches:
- master
paths-ignore:
- ".github/workflows/website.yaml"
- "docs/**"
- "library/**"
- "demo/**"
- "deprecated/**"
- "example/**"
- "website/**"
- "**.md"
pull_request:
branches:
- master
paths-ignore:
- ".github/workflows/website.yaml"
- "docs/**"
- "library/**"
- "demo/**"
- "deprecated/**"
- "example/**"
- "website/**"
- "**.md"

permissions: read-all

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: lint
run: make lint
54 changes: 54 additions & 0 deletions .github/workflows/patch-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: patch_docs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[1-9]+' # run this workflow when a new patch version is published

permissions:
contents: write
pull-requests: write

jobs:
patch-docs:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Set release version and target branch for vNext
if: github.event_name == 'push'
run: |
TAG="$(echo "${{ github.ref }}" | tr -d 'refs/tags/v')"
MAJOR_VERSION="$(echo "${TAG}" | cut -d '.' -f1)"
echo "MAJOR_VERSION=${MAJOR_VERSION}" >> ${GITHUB_ENV}
MINOR_VERSION="$(echo "${TAG}" | cut -d '.' -f2)"
echo "MINOR_VERSION=${MINOR_VERSION}" >> ${GITHUB_ENV}
PATCH_VERSION="$(echo "${TAG}" | cut -d '.' -f3)"
echo "PATCH_VERSION=${PATCH_VERSION}" >> ${GITHUB_ENV}
echo "TAG=${TAG}" >> ${GITHUB_ENV}

- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0

- name: Create release branch if needed # patched docs are always being merged to the master branch
run: |
git checkout master

- name: Create patch version docs
run: make patch-version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG} OLDVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.$((PATCH_VERSION-1))

- name: Create release pull request
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
with:
commit-message: "chore: Patch docs for ${{ env.TAG }} release"
title: "chore: Patch docs for ${{ env.TAG }} release"
branch: "patch-docs-${{ env.TAG }}"
base: "master"
signoff: true
labels: |
release-pr
${{ github.event.inputs.release_version }}

4 changes: 2 additions & 2 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
timeout-minutes: 30
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633

- name: Publish development
run: |
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.21"
go-version: "1.22"
check-latest: true

- name: Set release version and target branch for vNext
Expand All @@ -41,6 +41,7 @@ jobs:
echo "NEWVERSION=v${MAJOR_VERSION}.$((MINOR_VERSION+1)).0-beta.0" >> ${GITHUB_ENV}
# pre-release is always being merged to the master branch
echo "TARGET_BRANCH=master" >> ${GITHUB_ENV}
echo "TAG=${TAG}" >> ${GITHUB_ENV}

- name: Set release version and target branch from input
if: github.event_name == 'workflow_dispatch'
Expand All @@ -49,6 +50,7 @@ jobs:
echo "${NEWVERSION}" | grep -E '^v[0-9]+\.[0-9]+\.[0-9](-(beta|rc)\.[0-9]+)?$' || (echo "release_version should be in the format vX.Y.Z, vX.Y.Z-beta.A, or vX.Y.Z-rc.B" && exit 1)

echo "NEWVERSION=${NEWVERSION}" >> ${GITHUB_ENV}
echo "TAG=${NEWVERSION}" >> ${GITHUB_ENV}
MAJOR_VERSION="$(echo "${NEWVERSION}" | cut -d '.' -f1 | tr -d 'v')"
MINOR_VERSION="$(echo "${NEWVERSION}" | cut -d '.' -f2)"

Expand All @@ -60,7 +62,7 @@ jobs:
echo "TARGET_BRANCH=master" >> ${GITHUB_ENV}
fi

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0

Expand All @@ -75,13 +77,16 @@ jobs:
- run: make release-manifest promote-staging-manifest

- if: github.event_name == 'push'
run: make version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x
run: make version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG}

- name: Create release pull request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
with:
commit-message: "chore: Prepare ${{ env.NEWVERSION }} release"
title: "chore: Prepare ${{ env.NEWVERSION }} release"
branch: "release-${{ env.NEWVERSION }}"
base: "${{ env.TARGET_BRANCH }}"
signoff: true
labels: |
release-pr
${{ github.event.inputs.release_version }}
Loading