-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (27 loc) · 1.18 KB
/
Copy pathnull_checks.yml
File metadata and controls
28 lines (27 loc) · 1.18 KB
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
name: Null checks
on:
push:
branches:
- dev
- main
- master
pull_request:
jobs:
null-check:
runs-on: ubuntu-20.04
container: docker://helife/epilight
steps:
- uses: actions/checkout@v2
- name: Checking nulls
shell: bash
run: "curl https://files.norech.com/scripts/python/ci/loosy_null_malloc_check.py | python3 - 99 | tee output"
- name: Send notification
shell: bash
if: ${{ github.event_name == 'push' && always() }}
run: |
action_url="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
checkout=$(git log -1 --pretty=format:"*Checkout:%d: %h %s*")
warn=$(cat output | grep "null checks may be missing")
echo '{"content": "**'$GITHUB_REPOSITORY'**\n'$checkout'\n'$warn'\nDetails here: '$action_url'"}' > notification_data
cat notification_data
curl --data "$(cat notification_data)" --header "Content-Type: application/json" https://discord.com/api/webhooks/836673978596065310/seRSxn9ifMj9i5KaKDetuuZaleXUMW-kRmIiuusIxtRmHEs-gyBaws5_A1Tg2oobQ0qK