File tree Expand file tree Collapse file tree 3 files changed +65
-14
lines changed Expand file tree Collapse file tree 3 files changed +65
-14
lines changed Original file line number Diff line number Diff line change 1+ name : Pull Request
2+ on :
3+ pull_request_target :
4+ types :
5+ - opened
6+ - synchronize
7+ - reopened
8+ - labeled
9+ branches :
10+ - main
11+ paths-ignore :
12+ - README.md
13+
14+ jobs :
15+ check-perms :
16+ if : ${{ !github.event.pull_request.merged }}
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Get User Permission
20+ id : checkAccess
21+ uses : actions-cool/check-user-permission@v2
22+ with :
23+ require : write
24+ username : ${{ github.triggering_actor }}
25+ env :
26+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27+ - name : Check User Permission
28+ if : steps.checkAccess.outputs.require-result == 'false'
29+ run : |
30+ echo "${{ github.triggering_actor }} does not have permissions on this repo."
31+ echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
32+ echo "Job originally triggered by ${{ github.actor }}"
33+ exit 1
34+ run-tests :
35+ uses : gptscript-ai/py-gptscript/.github/workflows/run_tests.yaml@main
36+ needs : check-perms
37+ with :
38+ git_ref : ${{ github.event.pull_request.head.sha }}
39+ secrets :
40+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
Original file line number Diff line number Diff line change 1+ name : Push Main
2+ on :
3+ push :
4+ branches :
5+ - main
6+ paths-ignore :
7+ - README.md
8+
9+ jobs :
10+ run-tests :
11+ uses : gptscript-ai/py-gptscript/.github/workflows/run_tests.yaml@main
12+ with :
13+ git_ref : ' '
14+ secrets :
15+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
Original file line number Diff line number Diff line change 1- name : test
1+ name : Run Tests
2+
23on :
3- push :
4- branches :
5- - main
6- paths-ignore :
7- - README.md
8- pull_request_target :
9- types :
10- - labeled
11- - unlabeled
12- branches :
13- - main
14- paths-ignore :
15- - README.md
4+ workflow_call :
5+ inputs :
6+ git_ref :
7+ required : true
8+ type : string
9+ secrets :
10+ OPENAI_API_KEY :
11+ required : true
1612
1713jobs :
1814 check-perms :
You can’t perform that action at this time.
0 commit comments