File tree 1 file changed +30
-4
lines changed
1 file changed +30
-4
lines changed Original file line number Diff line number Diff line change 5
5
- main
6
6
paths-ignore :
7
7
- README.md
8
- pull_request :
8
+ pull_request_target :
9
+ types :
10
+ - labeled
11
+ - unlabeled
9
12
branches :
10
13
- main
11
14
paths-ignore :
12
15
- README.md
13
16
14
17
jobs :
18
+ check-perms :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Get User Permission
22
+ id : checkAccess
23
+ uses : actions-cool/check-user-permission@v2
24
+ with :
25
+ require : write
26
+ username : ${{ github.triggering_actor }}
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29
+ - name : Check User Permission
30
+ if : steps.checkAccess.outputs.require-result == 'false'
31
+ run : |
32
+ echo "${{ github.triggering_actor }} does not have permissions on this repo."
33
+ echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
34
+ echo "Job originally triggered by ${{ github.actor }}"
35
+ exit 1
36
+
15
37
test-linux :
38
+ needs : check-perms
16
39
runs-on : ubuntu-latest
17
40
steps :
18
41
- uses : actions/checkout@v4
19
42
with :
20
43
fetch-depth : 1
44
+ ref : ${{ github.event.pull_request.head.sha }}
21
45
- uses : actions/setup-go@v5
22
46
with :
23
47
cache : false
@@ -26,20 +50,22 @@ jobs:
26
50
run : make validate
27
51
- name : Install gptscript
28
52
run : |
29
- curl https://get.gptscript.ai/releases/default_linux_amd64_v1/gptscript -o gptscript
30
- chmod +x gptscript
53
+ curl https://get.gptscript.ai/releases/default_linux_amd64_v1/gptscript -o ./gptscriptexe
54
+ chmod +x ./gptscriptexe
31
55
- name : Run Tests
32
56
env :
33
- GPTSCRIPT_BIN : ./gptscript
57
+ GPTSCRIPT_BIN : ./gptscriptexe
34
58
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
35
59
run : make test
36
60
37
61
test-windows :
62
+ needs : check-perms
38
63
runs-on : windows-latest
39
64
steps :
40
65
- uses : actions/checkout@v4
41
66
with :
42
67
fetch-depth : 1
68
+ ref : ${{ github.event.pull_request.head.sha }}
43
69
- uses : actions/setup-go@v5
44
70
with :
45
71
cache : false
You can’t perform that action at this time.
0 commit comments