From 004c900ca712c6e86fa7064c5230d9138f8eee4c Mon Sep 17 00:00:00 2001 From: watal Date: Sun, 19 Feb 2023 16:35:11 +0900 Subject: [PATCH] Exclude PR drafts from workflow targets --- .github/workflows/ci.yml | 11 ++++++++++- .github/workflows/codeql-analysis.yml | 17 +++++++++++------ .github/workflows/editerconfig-checker.yml | 8 ++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcd3196..dafdc79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,15 @@ name: golangci-lint -on: [push] +on: + push: + branches: [ 'main' ] + pull_request: + branches: [ 'main' ] + types: + - opened + - reopened + - synchronize + - ready_for_review jobs: golangci: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 81944db..3eecbd9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,14 +9,19 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: CodeQL on: push: - branches: [ "main" ] + branches: [ 'main' ] pull_request: # The branches below must be a subset of the branches above - branches: [ "main" ] + branches: [ 'main' ] + types: + - opened + - reopened + - synchronize + - ready_for_review schedule: - cron: '0 9 * * 1' @@ -48,11 +53,11 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild @@ -61,7 +66,7 @@ jobs: # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. + # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | diff --git a/.github/workflows/editerconfig-checker.yml b/.github/workflows/editerconfig-checker.yml index d0ee6f9..3f90468 100644 --- a/.github/workflows/editerconfig-checker.yml +++ b/.github/workflows/editerconfig-checker.yml @@ -2,6 +2,14 @@ name: EditorConfig Checker on: push: + branches: [ 'main' ] + pull_request: + branches: [ 'main' ] + types: + - opened + - reopened + - synchronize + - ready_for_review jobs: editorconfig: