diff --git a/.github/workflows/pull-request-publish.yml b/.github/workflows/pull-request-publish.yml index 2a37bd4..8684a45 100644 --- a/.github/workflows/pull-request-publish.yml +++ b/.github/workflows/pull-request-publish.yml @@ -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'