test(CI): Update compile command to check with fork
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
e6ffbc44ff
Коммит
30f65db723
|
@ -26,6 +26,12 @@ jobs:
|
|||
base_ref: ${{ steps.comment-branch.outputs.base_ref }}
|
||||
|
||||
steps:
|
||||
- name: Disabled on forks
|
||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
run: |
|
||||
echo 'Can not execute /compile on forks'
|
||||
exit 1
|
||||
|
||||
- name: Check actor permission
|
||||
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
|
||||
with:
|
||||
|
@ -57,6 +63,15 @@ jobs:
|
|||
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
|
||||
id: comment-branch
|
||||
|
||||
- name: Add reaction on failure
|
||||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
|
||||
if: failure()
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
repository: ${{ github.event.repository.full_name }}
|
||||
comment-id: ${{ github.event.comment.id }}
|
||||
reactions: '-1'
|
||||
|
||||
process:
|
||||
runs-on: ubuntu-latest
|
||||
needs: init
|
||||
|
@ -95,7 +110,7 @@ jobs:
|
|||
|
||||
- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
|
||||
run: npm i -g 'npm@${{ steps.package-engines-versions.outputs.npmVersion }}'
|
||||
|
||||
|
||||
- name: Rebase to ${{ needs.init.outputs.base_ref }}
|
||||
if: ${{ contains(needs.init.outputs.arg1, 'rebase') }}
|
||||
run: |
|
||||
|
@ -115,7 +130,7 @@ jobs:
|
|||
run: |
|
||||
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
|
||||
git commit --signoff -m 'chore(assets): Recompile assets'
|
||||
|
||||
|
||||
- name: Commit fixup
|
||||
if: ${{ contains(needs.init.outputs.arg1, 'fixup') }}
|
||||
run: |
|
||||
|
@ -129,7 +144,7 @@ jobs:
|
|||
git commit --amend --no-edit --signoff
|
||||
# Remove any [skip ci] from the amended commit
|
||||
git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
|
||||
|
||||
|
||||
- name: Push normally
|
||||
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
|
||||
run: git push origin '${{ needs.init.outputs.head_ref }}'
|
||||
|
|
Загрузка…
Ссылка в новой задаче