Commit 114fe4e 1 parent 4a07a79 commit 114fe4e Copy full SHA for 114fe4e
File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check PR run
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ permissions : read-all
7
+
8
+ jobs :
9
+ check :
10
+ name : Check
11
+ runs-on : ubuntu-22.04
12
+
13
+ steps :
14
+ - name : Get user permission
15
+ id : get-permission
16
+ uses : actions-cool/check-user-permission@956b2e73cdfe3bcb819bb7225e490cb3b18fd76e # v2.2.1
17
+ with :
18
+ require : write
19
+ username : ${{ github.triggering_actor }}
20
+ env :
21
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
+
23
+ - name : Check user permission
24
+ if : steps.get-permission.outputs.require-result == 'false'
25
+ run : |
26
+ echo "User ${{ github.triggering_actor }} does not have the necessary access for this repository."
27
+ echo "Current permission level is ${{ steps.get-permission.outputs.user-permission }}."
28
+ echo "Job originally triggered by ${{ github.actor }}."
29
+ exit 1
You can’t perform that action at this time.
0 commit comments