ci: fix wrong trigger pr-deploy.yaml (#8151)

This commit is contained in:
Muhammad Atif Ali
2023-06-22 18:29:27 +03:00
committed by GitHub
parent 1ffc8058c2
commit eee4f835ec
+3 -3
View File
@@ -22,7 +22,7 @@ concurrency:
jobs:
pr_commented:
if: ${{ github.event.issue.pull_request }} && contains(github.event.comment.body, '/deploy-pr') && github.event.comment.author_association == 'MEMBER' || github.event_name == 'workflow_dispatch'
if: github.event_name == 'issue_comment' && contains(github.event.comment.body, '/deploy-pr') && github.event.comment.author_association == 'MEMBER' || github.event_name == 'workflow_dispatch'
outputs:
PR_NUMBER: ${{ steps.pr_number.outputs.PR_NUMBER }}
PR_TITLE: ${{ steps.pr_number.outputs.PR_TITLE }}
@@ -37,9 +37,9 @@ jobs:
id: pr_number
run: |
set -euxo pipefail
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
PR_NUMBER=${{ github.event.inputs.pr_number }}
PR_TITLE=$(curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/coder/coder/pulls/$PR_NUMBER | jq -r '.title')
PR_TITLE=$(curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/coder/coder/pulls/$PR_NUMBER" | jq -r '.title')
else
PR_NUMBER=${{ github.event.issue.number }}
PR_TITLE=${{ github.event.issue.title }}