forked from auto-pts/auto-pts
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.49 KB
/
run_cron_from_pr.yaml
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
40
41
42
43
44
45
46
47
48
49
name: Check PR for changes in autopts/wid/
on:
pull_request_target:
types: [ready_for_review, opened]
branches:
- master
env:
PR_NUMBER: ${{ github.event.number }}
jobs:
check_changes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Check for changes in autopts/wid directory
id: check_changes
run: |
python .github/check_for_changes.py
echo "Script exited with code $?"
- name: Set output
id: set_output
if: ${{ steps.check_changes.outcome == 'success' }}
run: |
echo "changed_files=$(cat changed_files_formatted.txt)" >> $GITHUB_OUTPUT
- name: Post comment on PR
if: ${{ steps.check_changes.outcome == 'success' }}
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
\#AutoPTS run mynewt ${{ steps.set_output.outputs.changed_files }} --test-case-limit 10
- name: Post comment on PR
if: ${{ steps.check_changes.outcome == 'success' }}
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
\#AutoPTS run zephyr ${{ steps.set_output.outputs.changed_files }} --test-case-limit 10