From 0e8b8c0735117e2c19aaff13e9e53754eaa3b57c Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 27 Jan 2023 09:37:28 +1100 Subject: [PATCH] Don't run gh actions on draft prs (#13706) --- .github/workflows/build-test-debug.yml | 3 ++- .github/workflows/build-test-release.yml | 3 ++- .github/workflows/test-packaging.yml | 3 ++- .github/workflows/validate-rgas.yml | 7 +++++-- .github/workflows/validate_mapfiles.yml | 6 +++++- .github/workflows/yaml-linter.yml | 7 +++++-- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml index 75edbccb096..1ae02a772ee 100644 --- a/.github/workflows/build-test-debug.yml +++ b/.github/workflows/build-test-debug.yml @@ -14,6 +14,7 @@ on: - 'RobustToolbox' - 'RobustToolbox/**' pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] branches: [ master ] paths: - '**.cs' @@ -26,7 +27,7 @@ on: jobs: build: - if: github.actor != 'PJBot' + if: github.actor != 'PJBot' && github.event.pull_request.draft == false strategy: matrix: os: [ubuntu-latest, windows-latest] diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index abd8c907366..6964cb7cd63 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -14,6 +14,7 @@ on: - 'RobustToolbox' - 'RobustToolbox/**' pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] branches: [ master ] paths: - '**.cs' @@ -26,7 +27,7 @@ on: jobs: build: - if: github.actor != 'PJBot' + if: github.actor != 'PJBot' && github.event.pull_request.draft == false strategy: matrix: os: [ubuntu-latest, windows-latest] diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml index 198b3f5768f..377abc9dc17 100644 --- a/.github/workflows/test-packaging.yml +++ b/.github/workflows/test-packaging.yml @@ -14,6 +14,7 @@ on: - 'RobustToolbox' - 'RobustToolbox/**' pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] branches: [ master ] paths: - '**.cs' @@ -26,7 +27,7 @@ on: jobs: build: - if: github.actor != 'PJBot' + if: github.actor != 'PJBot' && github.event.pull_request.draft == false runs-on: ubuntu-latest steps: diff --git a/.github/workflows/validate-rgas.yml b/.github/workflows/validate-rgas.yml index 9f7cfbca825..fa7873798c2 100644 --- a/.github/workflows/validate-rgas.yml +++ b/.github/workflows/validate-rgas.yml @@ -1,9 +1,12 @@ name: YAML schema validator -on: [pull_request, push] +on: + push: + pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] jobs: yaml-schema-validation: - if: github.actor != 'PJBot' + if: github.actor != 'PJBot' && github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/validate_mapfiles.yml b/.github/workflows/validate_mapfiles.yml index 9b045ee68bd..fdaee6cc972 100644 --- a/.github/workflows/validate_mapfiles.yml +++ b/.github/workflows/validate_mapfiles.yml @@ -1,8 +1,12 @@ name: YAML schema validator -on: [pull_request, push] +on: + push: + pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] jobs: yaml-schema-validation: + if: github.actor != 'PJBot' && github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml index fad9f091d77..2b996bd477c 100644 --- a/.github/workflows/yaml-linter.yml +++ b/.github/workflows/yaml-linter.yml @@ -1,10 +1,13 @@ name: YAML Linter -on: [pull_request, push] +on: + push: + pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] jobs: build: - if: github.actor != 'PJBot' + if: github.actor != 'PJBot' && github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2