11
11
issue_comment :
12
12
types : [created]
13
13
14
+ permissions :
15
+ contents : read
16
+
14
17
jobs :
15
18
init :
16
19
runs-on : ubuntu-latest
45
48
- name : Disabled on forks
46
49
if : ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }}
47
50
run : |
48
- echo 'Can not execute /compile on forks'
49
- exit 1
51
+ echo 'Can not execute /compile on forks'
52
+ exit 1
50
53
51
54
- name : Check actor permission
52
55
uses : skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
@@ -76,23 +79,34 @@ jobs:
76
79
fi
77
80
78
81
- name : Init branch
79
- uses : xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v1
82
+ uses : xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0
80
83
id : comment-branch
81
84
85
+ - name : Add reaction on failure
86
+ uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
87
+ if : failure()
88
+ with :
89
+ token : ${{ secrets.COMMAND_BOT_PAT }}
90
+ repository : ${{ github.event.repository.full_name }}
91
+ comment-id : ${{ github.event.comment.id }}
92
+ reactions : ' -1'
93
+
82
94
process :
83
95
runs-on : ubuntu-latest
84
96
needs : init
85
97
86
98
steps :
87
99
- name : Restore cached git repository
88
- uses : buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4
100
+ uses : buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
89
101
with :
90
102
path : .git
91
103
key : git-repo
92
104
93
105
- name : Checkout ${{ needs.init.outputs.head_ref }}
94
106
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
95
107
with :
108
+ # Needed to allow force push later
109
+ persist-credentials : true
96
110
token : ${{ secrets.COMMAND_BOT_PAT }}
97
111
fetch-depth : 0
98
112
ref : ${{ needs.init.outputs.head_ref }}
@@ -110,14 +124,14 @@ jobs:
110
124
fallbackNpm : ' ^10'
111
125
112
126
- name : Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
113
- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v3
127
+ uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
114
128
with :
115
129
node-version : ${{ steps.package-engines-versions.outputs.nodeVersion }}
116
130
cache : npm
117
131
118
132
- name : Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
119
133
run : npm i -g 'npm@${{ steps.package-engines-versions.outputs.npmVersion }}'
120
-
134
+
121
135
- name : Rebase to ${{ needs.init.outputs.base_ref }}
122
136
if : ${{ contains(needs.init.outputs.arg1, 'rebase') }}
123
137
run : |
@@ -137,7 +151,7 @@ jobs:
137
151
run : |
138
152
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
139
153
git commit --signoff -m 'chore(assets): Recompile assets'
140
-
154
+
141
155
- name : Commit fixup
142
156
if : ${{ contains(needs.init.outputs.arg1, 'fixup') }}
143
157
run : |
0 commit comments