mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
ci: fix wrong trigger pr-deploy.yaml (#8151)
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user