Skip to content

Commit

Permalink
chore(ci): fix trigger on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Thom-x committed Mar 4, 2024
1 parent 6c2fc63 commit d13ffc4
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/pull-request-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@ jobs:
if: github.event.issue.pull_request
steps:
- name: If deploy comment
uses: khan/pull-request-comment-trigger@v1.1.0
id: check
with:
trigger: '@deploy'
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

COMMENT: ${{ github.event.comment.body }}
id: check
run: |
if [[ "${COMMENT}" == "@deploy" ]]; then
else
curl -f -s -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel
sleep 60s
exit 42
fi
test:
needs: is_deploy_comment
if: needs.is_deploy_comment.outputs.is_deploy == 'true'
Expand Down

0 comments on commit d13ffc4

Please sign in to comment.