diff --git a/.github/workflows/release-announcement.yml b/.github/workflows/release-announcement.yml index bbd53e20a..76ed42a4f 100644 --- a/.github/workflows/release-announcement.yml +++ b/.github/workflows/release-announcement.yml @@ -5,12 +5,14 @@ name: Announce release on Discord # release note to a Discord webhook. Called from release.yml. on: workflow_call: - # MITTWALD_AI_API_KEY is a secret of the "ai-agents" environment, which - # cannot be passed in by the caller. secrets: DISCORD_WEBHOOK_URL: description: Discord webhook URL the release note is posted to. required: true + # A secret of the "ai-agents" environment (announce job). The caller + # still has to pass it by name, otherwise it is empty here. + MITTWALD_AI_API_KEY: + required: true permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abd856de8..b03e39f64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -302,6 +302,9 @@ jobs: uses: ./.github/workflows/release-announcement.yml secrets: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + # Environment secret of "ai-agents"; it has to be passed by name even + # though this job can't read it. + MITTWALD_AI_API_KEY: ${{ secrets.MITTWALD_AI_API_KEY }} cleanup-artifacts: runs-on: ubuntu-latest diff --git a/.github/workflows/review-dependabot-pr.yml b/.github/workflows/review-dependabot-pr.yml index 841a92795..dc296e051 100644 --- a/.github/workflows/review-dependabot-pr.yml +++ b/.github/workflows/review-dependabot-pr.yml @@ -34,9 +34,17 @@ on: Skip the agent review and merge as soon as the required checks pass. type: boolean default: false - # No secrets are passed in: MITTWALD_AI_API_KEY is a secret of the - # "ai-agents" environment (review job), the dependency app's credentials - # are secrets of the "dependency-updates" environment (apply job). + # These are environment secrets: MITTWALD_AI_API_KEY of "ai-agents" + # (review job), the dependency app's credentials of "dependency-updates" + # (apply job). The caller still has to pass them by name, otherwise they + # are empty here. Each job only gets the values of its own environment. + secrets: + MITTWALD_AI_API_KEY: + required: false + DEPENDENCY_APP_CLIENT_ID: + required: true + DEPENDENCY_APP_PRIVATE_KEY: + required: true workflow_dispatch: inputs: pr: diff --git a/.github/workflows/review-dependabot-prs.yml b/.github/workflows/review-dependabot-prs.yml index 0b28e9ef6..31610e455 100644 --- a/.github/workflows/review-dependabot-prs.yml +++ b/.github/workflows/review-dependabot-prs.yml @@ -100,6 +100,11 @@ jobs: with: pr: ${{ matrix.pr }} fast-track: true + # Environment secrets of "dependency-updates"; they have to be passed by + # name even though the caller can't read them. + secrets: + DEPENDENCY_APP_CLIENT_ID: ${{ secrets.DEPENDENCY_APP_CLIENT_ID }} + DEPENDENCY_APP_PRIVATE_KEY: ${{ secrets.DEPENDENCY_APP_PRIVATE_KEY }} review: name: Review PR #${{ matrix.pr }} @@ -113,3 +118,9 @@ jobs: uses: ./.github/workflows/review-dependabot-pr.yml with: pr: ${{ matrix.pr }} + # Environment secrets of "ai-agents" and "dependency-updates"; they have + # to be passed by name even though the caller can't read them. + secrets: + MITTWALD_AI_API_KEY: ${{ secrets.MITTWALD_AI_API_KEY }} + DEPENDENCY_APP_CLIENT_ID: ${{ secrets.DEPENDENCY_APP_CLIENT_ID }} + DEPENDENCY_APP_PRIVATE_KEY: ${{ secrets.DEPENDENCY_APP_PRIVATE_KEY }}