refactor: break long line into multiple lines for readability
Signed-off-by: WANG Xu <feici02@outlook.com>
This commit is contained in:
parent
8c8b013565
commit
ab8e2b7590
|
@ -1,4 +1,5 @@
|
|||
name: Cancel Workflow on Merge or Close
|
||||
description: Cancels the workflow if the PR is merged or closed to avoid unnecessary runs.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -15,4 +16,11 @@ jobs:
|
|||
run: |
|
||||
echo "PR has been merged or closed, cancelling workflow..."
|
||||
gh auth status
|
||||
gh run list --repo ${{ github.repository }} --branch ${{ github.event.pull_request.head.ref }} --workflow "TDengine Test" --status in_progress --status queued --json databaseId --jq '.[].databaseId' | xargs -I {} gh run cancel --repo ${{ github.repository }} {}
|
||||
gh run list \
|
||||
--repo ${{ github.repository }} \
|
||||
--branch ${{ github.event.pull_request.head.ref }} \
|
||||
--workflow "TDengine Test" \
|
||||
--status in_progress \
|
||||
--status queued
|
||||
--json databaseId --jq '.[].databaseId' | \
|
||||
xargs -I {} gh run cancel --repo ${{ github.repository }} {}
|
Loading…
Reference in New Issue