Add support for CLIENT-ID, CLIENT-SECRET, and OAUTH-PRIVATE-TOKEN environment variables
All checks were successful
Publish Twitch Archive Container / publish (push) Successful in 1m29s

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
MaddoScientisto 2026-04-25 17:04:44 +02:00
commit 4083fb4d78
2 changed files with 30 additions and 0 deletions

View file

@ -3,4 +3,25 @@ set -eu
mkdir -p /app/archive /app/config /app/bin/temp
if [ -z "${CLIENT_ID:-}" ]; then
client_id_from_hyphenated="$(printenv 'CLIENT-ID' 2>/dev/null || true)"
if [ -n "$client_id_from_hyphenated" ]; then
export CLIENT_ID="$client_id_from_hyphenated"
fi
fi
if [ -z "${CLIENT_SECRET:-}" ]; then
client_secret_from_hyphenated="$(printenv 'CLIENT-SECRET' 2>/dev/null || true)"
if [ -n "$client_secret_from_hyphenated" ]; then
export CLIENT_SECRET="$client_secret_from_hyphenated"
fi
fi
if [ -z "${OAUTH_PRIVATE_TOKEN:-}" ]; then
oauth_token_from_hyphenated="$(printenv 'OAUTH-PRIVATE-TOKEN' 2>/dev/null || true)"
if [ -n "$oauth_token_from_hyphenated" ]; then
export OAUTH_PRIVATE_TOKEN="$oauth_token_from_hyphenated"
fi
fi
exec "$@"