From 23bcbe5d531c753a7e21a24da99adb7f01a65e7f Mon Sep 17 00:00:00 2001 From: Clo91eaf Date: Wed, 20 Nov 2024 20:09:00 +0800 Subject: [PATCH] [ci] fix some flow would still be allowed to run after being marked as draft --- .github/workflows/t1rocket.yml | 3 ++- .github/workflows/vcs.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/t1rocket.yml b/.github/workflows/t1rocket.yml index b61857a01..6e6b54c21 100644 --- a/.github/workflows/t1rocket.yml +++ b/.github/workflows/t1rocket.yml @@ -87,9 +87,10 @@ jobs: report: name: "Report T1Rocket VCS CI result" # Don't run report when: + # - marked draft ( we don't need to run report for draft PR ) # - user cancel ( we don't need report at this case ) # - PR from outside repository ( we don't have permission to push commit into fork repository ) - if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository && !github.event.pull_request.draft }} needs: [run-testcases] runs-on: [self-hosted, linux, nixos] permissions: diff --git a/.github/workflows/vcs.yml b/.github/workflows/vcs.yml index 58749a8df..37046a549 100644 --- a/.github/workflows/vcs.yml +++ b/.github/workflows/vcs.yml @@ -87,9 +87,10 @@ jobs: report: name: "Report VCS CI result" # Don't run report when: + # - marked draft ( we don't need to run report for draft PR ) # - user cancel ( we don't need report at this case ) # - PR from outside repository ( we don't have permission to push commit into fork repository ) - if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository && !github.event.pull_request.draft }} needs: [run-testcases] runs-on: [self-hosted, linux, nixos] permissions: