diff --git a/.github/workflows/helm-upgrade-doc.yml b/.github/workflows/helm-upgrade-doc.yml index d4f3d92e..d44571fe 100644 --- a/.github/workflows/helm-upgrade-doc.yml +++ b/.github/workflows/helm-upgrade-doc.yml @@ -14,6 +14,14 @@ name: "Helm Upgrade Doc" # upgrade-doc: # uses: LerianStudio/github-actions-shared-workflows/.github/workflows/helm-upgrade-doc.yml@v1 # secrets: inherit +# +# Slack channel: the notification channel is a GENERIC `SLACK_CHANNEL` secret, so +# switching channels never requires editing this shared workflow. With +# `secrets: inherit` it uses the caller's `SLACK_CHANNEL`. To point at a different +# channel, map any channel secret to it in the CALLER (instead of inherit): +# secrets: +# SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL_OPS }} # or any channel secret +# # ...plus the other secrets this workflow requires... on: workflow_call: @@ -58,7 +66,7 @@ on: required: false SLACK_BOT_TOKEN_HELM: required: false - SLACK_CHANNEL_DEVOPS: + SLACK_CHANNEL: required: false SLACK_GROUP_TECH_SUPPORT: required: false @@ -92,7 +100,7 @@ jobs: anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} openrouter-api-key: ${{ secrets.OPENROUTER_API_KEY }} slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN_HELM }} - slack-channel: ${{ secrets.SLACK_CHANNEL_DEVOPS }} + slack-channel: ${{ secrets.SLACK_CHANNEL }} slack-group-ops: ${{ secrets.SLACK_GROUP_TECH_SUPPORT }} charts-root: ${{ inputs.charts_root }} docs-subdir: ${{ inputs.docs_subdir }} diff --git a/docs/helm-upgrade-doc.md b/docs/helm-upgrade-doc.md index 6f173528..5b68a9d8 100644 --- a/docs/helm-upgrade-doc.md +++ b/docs/helm-upgrade-doc.md @@ -106,9 +106,17 @@ All secrets are passed via `secrets: inherit`. The caller repository must have t | `ANTHROPIC_API_KEY` | No | Anthropic API key. When set, takes priority over OpenRouter | | `OPENROUTER_API_KEY` | No | OpenRouter API key. Used when `ANTHROPIC_API_KEY` is not set | | `SLACK_BOT_TOKEN_HELM` | No | Slack bot token for PR review notifications | -| `SLACK_CHANNEL_DEVOPS` | No | Slack channel ID to send notifications | +| `SLACK_CHANNEL` | No | Slack channel ID to send notifications. Generic — map any channel secret to it in the caller (e.g. `SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL_OPS }}`) | | `SLACK_GROUP_TECH_SUPPORT` | No | Slack group ID to mention in notifications (e.g. ops team) | +> **Slack channel with `secrets: inherit`:** `inherit` matches by name — it does **not** +> rename `SLACK_CHANNEL_OPS` to `SLACK_CHANNEL`. The caller must have a secret named +> exactly `SLACK_CHANNEL`, otherwise `slack-channel` is empty and the Slack step is +> skipped. To target a channel whose secret has a different name, replace +> `secrets: inherit` with an explicit mapping listing every required secret plus +> `SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL_OPS }}` (you cannot combine `inherit` +> with an explicit `secrets:` block). + > **Note:** At least one of `ANTHROPIC_API_KEY` or `OPENROUTER_API_KEY` must be provided. ## Outputs