Skip to content

Commit aff7a29

Browse files
committed
ci: gate Telegram auto-notify behind repo variable (default off)
The `telegram:` job now runs only when the repo-level variable `TELEGRAM_NOTIFY_ENABLED` is set to the literal string \"true\". Default (unset) = job skips silently. Turn on: gh variable set TELEGRAM_NOTIFY_ENABLED --body true Turn off: gh variable set TELEGRAM_NOTIFY_ENABLED --body false (or `gh variable delete TELEGRAM_NOTIFY_ENABLED`) The Python script, secrets, and changelog format all stay in place so re-enabling is a one-liner, not a workflow edit. Forks that don't need Telegram don't have to touch anything — they get the clean no-notify behaviour out of the box.
1 parent d2b4c29 commit aff7a29

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,16 @@ jobs:
371371
telegram:
372372
needs: [android, release]
373373
runs-on: ubuntu-latest
374-
# `vars.TELEGRAM_NOTIFY_ENABLED` defaults to empty in forks; set
375-
# `TELEGRAM_NOTIFY_ENABLED=1` as a repo variable to enable. In
376-
# the therealaleph origin we leave it on permanently via this
377-
# env fallback — the `|| ...` expression makes it default-on
378-
# when the secret is present.
379-
if: ${{ always() && needs.android.result == 'success' }}
374+
# Gated on the repo variable `TELEGRAM_NOTIFY_ENABLED`. Default is
375+
# OFF — the job skips silently unless the variable is set to the
376+
# literal string "true". Toggle via:
377+
#
378+
# gh variable set TELEGRAM_NOTIFY_ENABLED --body true
379+
# gh variable set TELEGRAM_NOTIFY_ENABLED --body false
380+
#
381+
# Keeping the machinery (script + secrets) in place so flipping
382+
# the switch back on is a one-liner, not a workflow edit.
383+
if: ${{ vars.TELEGRAM_NOTIFY_ENABLED == 'true' && needs.android.result == 'success' }}
380384
steps:
381385
- uses: actions/checkout@v4
382386

0 commit comments

Comments
 (0)