Skip to content

Commit 5cc93f7

Browse files
d-csclaude
andcommitted
ci: gate Dependabot notifiers and Helm release publish behind repository variables
Extends the helm-prerelease gate to the other optional jobs that fail on forks/mirrors lacking org-specific secrets or registry permissions: - ENABLE_DEPENDABOT_ALERTS gates the daily critical-alerts and weekly summary crons (need DEPENDABOT_ALERTS_TOKEN / SLACK_BOT_TOKEN). - ENABLE_HELM_PRERELEASE also gates release-helm's publish (same GHCR write_package requirement as the prerelease job). All default to enabled, so canonical-repo behaviour is unchanged; a job runs unless its variable is explicitly 'false'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3f62dcb commit 5cc93f7

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/dependabot-critical-alerts.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ permissions:
2525
jobs:
2626
alert:
2727
name: Post critical alerts
28+
# Set the ENABLE_DEPENDABOT_ALERTS repository variable to 'false' to turn off
29+
# the Dependabot alert/summary notifiers — e.g. forks/mirrors that lack the
30+
# DEPENDABOT_ALERTS_TOKEN / SLACK_BOT_TOKEN secrets. Defaults to enabled.
31+
if: ${{ vars.ENABLE_DEPENDABOT_ALERTS != 'false' }}
2832
runs-on: ubuntu-latest
2933
environment: dependabot-summary
3034
env:

.github/workflows/dependabot-weekly-summary.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ permissions:
1919
jobs:
2020
summary:
2121
name: Post weekly Dependabot summary
22+
# Set the ENABLE_DEPENDABOT_ALERTS repository variable to 'false' to turn off
23+
# the Dependabot alert/summary notifiers — e.g. forks/mirrors that lack the
24+
# DEPENDABOT_ALERTS_TOKEN / SLACK_BOT_TOKEN secrets. Defaults to enabled.
25+
if: ${{ vars.ENABLE_DEPENDABOT_ALERTS != 'false' }}
2226
runs-on: ubuntu-latest
2327
environment: dependabot-summary
2428
env:

.github/workflows/release-helm.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ jobs:
6363

6464
release:
6565
needs: lint-and-test
66+
# Set the ENABLE_HELM_PRERELEASE repository variable to 'false' to turn off
67+
# publishing the chart to GHCR — e.g. forks/mirrors that lack write_package
68+
# on the owner's charts namespace. Defaults to enabled; the lint-and-test
69+
# job above always runs regardless.
70+
if: ${{ vars.ENABLE_HELM_PRERELEASE != 'false' }}
6671
runs-on: ubuntu-latest
6772
permissions:
6873
contents: write # for gh-release

0 commit comments

Comments
 (0)