Skip to content

Commit 7d6bdf4

Browse files
committed
release: dispatch to charts repo
This commit adds a dispatch step to the release workflow that will trigger the [`release_from_operator` workflow](https://github.com/redpanda-data/helm-charts/blob/main/.github/workflows/release_from_operator.yaml) in the helm-charts repo, effectively automating the entire release process[^1]. [^1]: Supposing this works as expected. Testing GHA's of this nature is quite difficult.
1 parent 291d06e commit 7d6bdf4

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ steps:
8080
timeout_in_minutes: 180
8181
if: |
8282
// Only run if:
83-
// 1. There's a tag and it's of the form 'v*' or 'operator/v*'
83+
// 1. There's a tag in the form 'operator/v*'
8484
// 2. NIGHTLY_RELEASE envvar isn't set (paranoid check)
8585
// 3. This isn't a pull request (paranoid check)
8686
// 4. As buildkite schedule build on tag with the same branch settings as per the following (paranoid check)
@@ -90,7 +90,7 @@ steps:
9090
// > intended behaviour. Our docs aren’t really clear on this and we’re updating them now.
9191
//
9292
// https://forum.buildkite.community/t/branch-names-vs-tag-names/974/2
93-
(build.tag =~ /^v/ || build.tag =~ /^operator\/v/) &&
93+
(build.tag =~ /^operator\/v/) &&
9494
build.pull_request.id == null &&
9595
build.env("NIGHTLY_RELEASE") != "true" &&
9696
build.branch == build.tag

.github/workflows/release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515

1616
jobs:
1717
release:
18+
permissions:
19+
contents: write
1820
name: Create Release on GitHub
1921
runs-on: ubuntu-latest
2022

@@ -103,4 +105,20 @@ jobs:
103105
files: |
104106
./*.tgz
105107
106-
# todo(chrisseto) trigger an action in the charts repo that updates index.yaml
108+
# Trigger a workflow in the helm-charts repo to update the gh-pages index.yaml.
109+
# https://github.com/redpanda-data/helm-charts/blob/main/.github/workflows/release_from_operator.yaml
110+
- uses: aws-actions/configure-aws-credentials@v4
111+
with:
112+
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
113+
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
114+
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
115+
with:
116+
secret-ids: |
117+
,sdlc/prod/github/actions_bot_token
118+
parse-json-secrets: true
119+
- name: Trigger Sync Releases in redpanda-data/helm-charts
120+
uses: peter-evans/repository-dispatch@v2
121+
with:
122+
token: ${{ env.ACTIONS_BOT_TOKEN }}
123+
repository: redpanda-data/helm-charts
124+
event-type: sync-operator-repo-releases

0 commit comments

Comments
 (0)