File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 15
15
- README.md
16
16
17
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
+
18
37
test-linux :
38
+ needs : check-perms
19
39
runs-on : ubuntu-latest
20
40
steps :
21
41
- uses : actions/checkout@v4
22
42
with :
23
43
fetch-depth : 1
44
+ ref : ${{ github.event.pull_request.head.sha }}
24
45
- uses : actions/setup-go@v5
25
46
with :
26
47
cache : false
@@ -38,11 +59,13 @@ jobs:
38
59
run : make test
39
60
40
61
test-windows :
62
+ needs : check-perms
41
63
runs-on : windows-latest
42
64
steps :
43
65
- uses : actions/checkout@v4
44
66
with :
45
67
fetch-depth : 1
68
+ ref : ${{ github.event.pull_request.head.sha }}
46
69
- uses : actions/setup-go@v5
47
70
with :
48
71
cache : false
You can’t perform that action at this time.
0 commit comments