Inject Slack Actions secrets and verify live client credentials
This commit is contained in:
+11
-1
@@ -50,7 +50,17 @@ if [[ -s "$foundry/mail.env" ]]; then
|
||||
mail_env=(--env-file "$foundry/mail.env")
|
||||
fi
|
||||
slack_env=()
|
||||
if [[ -s "$foundry/slack.env" ]]; then
|
||||
if [[ -n "${SLACK_CLIENT_ID:-}" || -n "${SLACK_CLIENT_SECRET:-}" ]]; then
|
||||
for name in SLACK_CLIENT_ID SLACK_CLIENT_SECRET; do
|
||||
value=${!name-}
|
||||
if [[ -z "$value" || "$value" == *$'\n'* || "$value" == *$'\r'* ]]; then
|
||||
printf 'Missing or invalid %s\n' "$name" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
export SLACK_CLIENT_ID SLACK_CLIENT_SECRET
|
||||
slack_env=(-e SLACK_CLIENT_ID -e SLACK_CLIENT_SECRET)
|
||||
elif [[ -s "$foundry/slack.env" ]]; then
|
||||
slack_env=(--env-file "$foundry/slack.env")
|
||||
fi
|
||||
codex_mounts=()
|
||||
|
||||
Reference in New Issue
Block a user