-
Notifications
You must be signed in to change notification settings - Fork 1.7k
34 lines (32 loc) · 1.33 KB
/
sigscanner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: 'SigScanner Check'
on:
merge_group:
push:
jobs:
sigscanner-check:
runs-on: ubuntu-latest
steps:
- name: "SigScanner checking ${{ github.sha }} by ${{ github.actor }}"
env:
API_TOKEN: ${{ secrets.SIGSCANNER_API_TOKEN }}
API_URL: ${{ secrets.SIGSCANNER_API_URL }}
run: |
echo "🔎 Checking commit ${{ github.sha }} by ${{ github.actor }} in ${{ github.repository }} - ${{ github.event_name }}"
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 }}"}'`
echo "Received $CODE"
if [[ "$CODE" == "200" ]]; then
echo "✅ Commit is verified"
exit 0
else
echo "❌ Commit is NOT verified"
exit 1
fi
- name: Collect Metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@f4d2fcbe12e9e44921e0171d24085ab7d2a30bc9 # v2.0.1
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: sigscanner-check
continue-on-error: true