forked from tensorflow/tflite-micro
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (25 loc) · 1.02 KB
/
check_tflite_files.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
name: Check TfLite Files
on:
pull_request_target:
types: [labeled]
jobs:
check_tflite_files:
runs-on: ubuntu-latest
if: |
contains(github.event.pull_request.labels.*.name, 'ci:run')
name: Check PR Modifies TfLite Files
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check Files
if: ${{ !contains(github.event.pull_request.body, 'NO_CHECK_TFLITE_FILES=') }}
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
PR_FILES=$(curl -s -X GET -H "Authorization: Bearer ${{ secrets.TFLM_BOT_REPO_TOKEN }}" $URL | jq -r '.[] | .filename')
rm -rf /tmp/pull_request_files.txt
echo "${PR_FILES}" >> /tmp/pull_request_files.txt
python3 ci/check_tflite_files.py /tmp/pull_request_files.txt
TFLITE_FILE_TEST_STATUS=$?
rm -f /tmp/pull_request_files.txt
exit ${TFLITE_FILE_TEST_STATUS}