Skip to content

The agent that grows with you

fix(ci): give the stable-release reusable workflows their environment secrets

ethernetee5f49b943f8
diff --git a/.github/workflows/desktop-bundled-release.yml b/.github/workflows/desktop-bundled-release.yml
index 37388758906..089e386ed76 100644
--- a/.github/workflows/desktop-bundled-release.yml
+++ b/.github/workflows/desktop-bundled-release.yml
@@ -58,6 +58,11 @@ name: Desktop Bundled Release
# Manual dispatch selects a tag or a pushed full commit. Commit dispatches
# use the default-branch workflow and require maintainer permission.
#
+# Callers must dispatch with `secrets: inherit`: a called workflow receives
+# no secrets by default, and a job-level `environment:` alone attaches the
+# deployment and exposes `vars` but NOT that environment's secrets
+# (actions/runner#1490).
+#
# R2 secrets (repo-level or the release-signing environment): the R2
# account id + an R2 API token (S3-compatible) with read/write on the
# release bucket; CLOUDFLARE_R2_BUCKET and CLOUDFLARE_R2_PUBLIC_URL are
diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml
index 36fbc3cec0d..f5313fdba35 100644
--- a/.github/workflows/stable-release.yml
+++ b/.github/workflows/stable-release.yml
@@ -17,6 +17,13 @@ on:
permissions:
contents: read
+# Every reusable workflow called below inherits secrets (`secrets: inherit`)
+# because their release-signing jobs need protected-environment secrets. A
+# called workflow only sees them when the caller inherits AND the called job
+# declares the environment: the job-level `environment:` alone attaches the
+# deployment and exposes `vars`, but leaves `secrets.*` empty
+# (actions/runner#1490). ci.yaml is deliberately excluded — it runs
+# PR-controlled code and must stay secret-free.
concurrency:
group: stable-release
cancel-in-progress: false
@@ -76,6 +83,7 @@ jobs:
if: >-
!cancelled() && needs.admit.result == 'success'
uses: ./.github/workflows/docker.yml
+ secrets: inherit
with:
release-phase: test
skip-tests: ${{ needs.admit.outputs.skip-tests == 'true' }}
@@ -109,6 +117,7 @@ jobs:
contents: read
actions: read
uses: ./.github/workflows/termux-verify.yml
+ secrets: inherit
with:
release: true
@@ -145,6 +154,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}
@@ -165,6 +175,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}
@@ -185,6 +196,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}
@@ -205,6 +217,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}
@@ -227,6 +240,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}
@@ -247,6 +261,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}
@@ -505,6 +520,7 @@ jobs:
# stable/latest aliases move in the ordered publication pass.
needs: [admit, docker]
uses: ./.github/workflows/docker.yml
+ secrets: inherit
with:
release-phase: publish
tag: ${{ needs.admit.outputs.tag }}
@@ -520,6 +536,7 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/desktop-bundled-release.yml
+ secrets: inherit
with:
tag: ${{ needs.admit.outputs.tag }}
claim-tag: ${{ needs.admit.outputs.claim-tag }}