Inject Slack Actions secrets and verify live client credentials
Foundry Go checks / check (push) Failing after 1m37s
Foundry Go checks / check (pull_request) Successful in 2m3s

This commit is contained in:
2026-11-05 20:19:49 +08:00
parent 5b9af931c7
commit 6c69fcbaaa
3 changed files with 60 additions and 1 deletions
+11 -1
View File
@@ -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=()