2626 base_ref : ${{ steps.comment-branch.outputs.base_ref }}
2727
2828 steps :
29+ - name : Disabled on forks
30+ if : ${{ github.event.pull_request.head.repo.full_name != github.repository }}
31+ run : |
32+ echo 'Can not execute /compile on forks'
33+ exit 1
34+
2935 - name : Check actor permission
3036 uses : skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
3137 with :
5763 uses : xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
5864 id : comment-branch
5965
66+ - name : Add reaction on failure
67+ uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
68+ if : failure()
69+ with :
70+ token : ${{ secrets.COMMAND_BOT_PAT }}
71+ repository : ${{ github.event.repository.full_name }}
72+ comment-id : ${{ github.event.comment.id }}
73+ reactions : " -1"
74+
6075 process :
6176 runs-on : ubuntu-latest
6277 needs : init
95110
96111 - name : Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
97112 run : npm i -g 'npm@${{ steps.package-engines-versions.outputs.npmVersion }}'
98-
113+
99114 - name : Rebase to ${{ needs.init.outputs.base_ref }}
100115 if : ${{ contains(needs.init.outputs.arg1, 'rebase') }}
101116 run : |
@@ -115,7 +130,7 @@ jobs:
115130 run : |
116131 git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
117132 git commit --signoff -m 'chore(assets): Recompile assets'
118-
133+
119134 - name : Commit fixup
120135 if : ${{ contains(needs.init.outputs.arg1, 'fixup') }}
121136 run : |
@@ -129,7 +144,7 @@ jobs:
129144 git commit --amend --no-edit --signoff
130145 # Remove any [skip ci] from the amended commit
131146 git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
132-
147+
133148 - name : Push normally
134149 if : ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
135150 run : git push origin '${{ needs.init.outputs.head_ref }}'
0 commit comments