forked from hackclub/OnBoard
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.58 KB
/
non_requisite_checks.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
35
36
37
38
39
# name: Non-Requisite Check
# run-name: Non-Requisite Check
# on:
# pull_request:
# types: [opened] # make this only for main
# jobs:
# Non-Requisite-Check:
# name: Non-Requisite Check
# runs-on: ubuntu-latest
# steps:
# - name: Check out
# uses: actions/checkout@v2
# - name: Check for BOM
# run: |
# URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
# FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename')
# project_name=$(echo $FILES[0] | cut -d'/' -f2)
# if echo $FILES | grep -qi "$project_name/.*.csv" || echo $FILES | grep -qi "$project_name/.*.xlsx"; then
# echo "BOM included"
# else
# echo "BOM not included"
# exit 1
# fi
# exit 0
# - name: Check for design files
# run: |
# URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
# FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename')
# project_name=$(echo $FILES[0] | cut -d'/' -f2)
# if echo $FILES | grep -qi "$project_name/.*.json" || echo $FILES | grep -qi "$project_name/.*.brd" || echo $FILES | grep -qi "$project_name/.*.sch"; then
# echo "Design files included"
# else
# echo "Design files not included"
# exit 1
# fi
# exit 0