From 7362d075fcdbb55a3b8886888aed5f776e1619e2 Mon Sep 17 00:00:00 2001 From: darkobas Date: Mon, 16 Nov 2026 13:04:28 +0100 Subject: [PATCH 1/3] ci: create chart tags and releases as the bee-runner app --- .github/workflows/release.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e063f94..1cd259d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,9 +8,12 @@ on: jobs: release: runs-on: ubuntu-latest + permissions: + # The checkout token pushes the chart index to gh-pages. + contents: write steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: fetch-depth: 0 @@ -20,11 +23,22 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Install Helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4 with: version: v3.6.3 + # Chart tags and releases are created as the bee-runner app (tag creation is + # restricted by a ruleset), not with a personal token. + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + with: + app-id: ${{ secrets.BEE_RUNNER_APP_ID }} + private-key: ${{ secrets.BEE_RUNNER_KEY }} + # Least privilege: creates the chart tags and releases. + permission-contents: write + - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 + uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 env: - CR_TOKEN: "${{ secrets.CR_TOKEN }}" + CR_TOKEN: "${{ steps.app-token.outputs.token }}" From 7827d256efdac51202ad535811d4180716b472b9 Mon Sep 17 00:00:00 2001 From: darkobas Date: Mon, 16 Nov 2026 13:37:23 +0100 Subject: [PATCH 2/3] ci: create release tags with the ethersphere-release app key from an environment The bee-runner key is an org secret, so any workflow on any branch can read it and mint a token that creates tags, bypassing the approval. The new release app's key lives only in this repo's release environment, which only runs from the default branch (and, for cut-release, after a second person approves). --- .github/workflows/release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1cd259d..e18739a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,6 +8,8 @@ on: jobs: release: runs-on: ubuntu-latest + # Only this environment (default branch only) holds RELEASE_APP_KEY. + environment: release-ci permissions: # The checkout token pushes the chart index to gh-pages. contents: write @@ -27,14 +29,14 @@ jobs: with: version: v3.6.3 - # Chart tags and releases are created as the bee-runner app (tag creation is + # Chart tags and releases are created as the ethersphere-release app (tag creation is # restricted by a ruleset), not with a personal token. - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: - app-id: ${{ secrets.BEE_RUNNER_APP_ID }} - private-key: ${{ secrets.BEE_RUNNER_KEY }} + app-id: ${{ vars.RELEASE_APP_ID }} + private-key: ${{ secrets.RELEASE_APP_KEY }} # Least privilege: creates the chart tags and releases. permission-contents: write From 16b6b74d01731e87b389005e8008c149c7732ca6 Mon Sep 17 00:00:00 2001 From: darkobas Date: Mon, 16 Nov 2026 13:50:47 +0100 Subject: [PATCH 3/3] ci: name the release app correctly (bee-releaser) --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e18739a..0b0ce48 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: with: version: v3.6.3 - # Chart tags and releases are created as the ethersphere-release app (tag creation is + # Chart tags and releases are created as the bee-releaser app (tag creation is # restricted by a ruleset), not with a personal token. - name: Generate GitHub App token id: app-token