Skip to content

Commit 7652bbe

Browse files
ci: soft-skip on missing secrets and add curl timeouts (CodeRabbit)
1 parent 1ac6d91 commit 7652bbe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/notify-on-merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
run: |
1919
set -euo pipefail
2020
if [ -z "${DISPATCH_TOKEN:-}" ] || [ -z "${TARGET_REPO:-}" ]; then
21-
echo "::error::SYNC_DISPATCH_TOKEN and SYNC_TARGET_REPO are required."
22-
exit 1
21+
echo "::notice::SYNC_DISPATCH_TOKEN/SYNC_TARGET_REPO not set; skipping downstream notify."
22+
exit 0
2323
fi
2424
PAYLOAD="$(jq -n --arg sha "$COMMIT_SHA" \
2525
'{ event_type: "upstream-push", client_payload: { sha: $sha } }')"
26-
curl -fsSL -X POST \
26+
curl -fsSL --connect-timeout 10 --max-time 60 -X POST \
2727
-H "Accept: application/vnd.github+json" \
2828
-H "Authorization: Bearer ${DISPATCH_TOKEN}" \
2929
"https://api.github.com/repos/${TARGET_REPO}/dispatches" \

0 commit comments

Comments
 (0)