Skip to content

Commit f7815a2

Browse files
committed
Avoid sigscanner for PRs from chainlink-release-pusher[bot]
1 parent 11d25cd commit f7815a2

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

.github/workflows/sigscanner.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,43 @@
1-
name: 'SigScanner Check'
1+
name: "SigScanner Check"
22

33
on:
4+
pull_request:
45
merge_group:
56
push:
7+
branches:
8+
- develop
69

710
jobs:
811
sigscanner-check:
12+
# On pull_request, github.actor is the PR creator, so we can reliably
13+
# skip the bot's PRs. On merge_group the actor is whoever enqueued the
14+
# merge, so we skip entirely to avoid false positives.
15+
if: >-
16+
github.event_name != 'merge_group'
17+
&& github.actor != 'chainlink-release-pusher[bot]'
918
runs-on: ubuntu-latest
19+
env:
20+
# On pull_request, github.sha is a temporary merge commit; use the
21+
# actual PR head commit so SigScanner verifies the developer's signed
22+
# commit. On push, github.sha is the real commit on develop.
23+
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
1024
steps:
11-
- name: "SigScanner checking ${{ github.sha }} by ${{ github.actor }}"
25+
- name: "SigScanner checking ${{ env.COMMIT_SHA }} by ${{ github.actor }}"
1226
env:
1327
API_TOKEN: ${{ secrets.SIGSCANNER_API_TOKEN }}
1428
API_URL: ${{ secrets.SIGSCANNER_API_URL }}
1529
run: |
16-
echo "🔎 Checking commit ${{ github.sha }} by ${{ github.actor }} in ${{ github.repository }} - ${{ github.event_name }}"
17-
CODE=`curl --write-out '%{http_code}' -X POST -H "Content-Type: application/json" -H "Authorization: $API_TOKEN" --silent --output /dev/null --url "$API_URL" --data '{"commit":"${{ github.sha }}","repository":"${{ github.repository }}","author":"${{ github.actor }}"}'`
30+
echo "🔎 Checking commit ${COMMIT_SHA} by ${GITHUB_ACTOR} in ${GITHUB_REPOSITORY} - ${GITHUB_EVENT_NAME}"
31+
CODE=$(curl \
32+
--write-out '%{http_code}' \
33+
-X POST \
34+
-H "Content-Type: application/json" \
35+
-H "Authorization: $API_TOKEN" \
36+
--silent \
37+
--output /dev/null \
38+
--url "$API_URL" \
39+
--data "{\"commit\":\"${COMMIT_SHA}\",\"repository\":\"${GITHUB_REPOSITORY}\",\"author\":\"${GITHUB_ACTOR}\"}"
40+
)
1841
echo "Received $CODE"
1942
if [[ "$CODE" == "200" ]]; then
2043
echo "✅ Commit is verified"

0 commit comments

Comments
 (0)