mirror of
https://github.com/therealaleph/MasterHttpRelayVPN-RUST.git
synced 2026-05-17 21:24:48 +03:00
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.
This commit is contained in:
@@ -371,12 +371,16 @@ jobs:
|
||||
telegram:
|
||||
needs: [android, release]
|
||||
runs-on: ubuntu-latest
|
||||
# `vars.TELEGRAM_NOTIFY_ENABLED` defaults to empty in forks; set
|
||||
# `TELEGRAM_NOTIFY_ENABLED=1` as a repo variable to enable. In
|
||||
# the therealaleph origin we leave it on permanently via this
|
||||
# env fallback — the `|| ...` expression makes it default-on
|
||||
# when the secret is present.
|
||||
if: ${{ always() && needs.android.result == 'success' }}
|
||||
# Gated on the repo variable `TELEGRAM_NOTIFY_ENABLED`. Default is
|
||||
# OFF — the job skips silently unless the variable is set to the
|
||||
# literal string "true". Toggle via:
|
||||
#
|
||||
# gh variable set TELEGRAM_NOTIFY_ENABLED --body true
|
||||
# gh variable set TELEGRAM_NOTIFY_ENABLED --body false
|
||||
#
|
||||
# Keeping the machinery (script + secrets) in place so flipping
|
||||
# the switch back on is a one-liner, not a workflow edit.
|
||||
if: ${{ vars.TELEGRAM_NOTIFY_ENABLED == 'true' && needs.android.result == 'success' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user