From 9bf5e453c63acfb925c5c23fd19bda44f7bdf3b8 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Tue, 12 Jul 2022 20:10:49 -0300 Subject: ci: sort items on paths-ignore lists Leave quotes only on paths with wildcards so that they are sorted before normal paths, then sort everything. Note that in the current workflow files, ignored directories always use wildcards, so this also ensures that ignored directories (along with all other paths with wildcards) are always listed before ignored files (similarly to `--group-directories-first` in GNU `ls`). This order is similar to the one on .github/workflows/profile-checks.yml. --- .github/workflows/build-extra.yml | 16 ++++++++-------- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/profile-checks.yml | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml index c0e0062cd..f61e41797 100644 --- a/.github/workflows/build-extra.yml +++ b/.github/workflows/build-extra.yml @@ -4,7 +4,10 @@ on: push: branches: [ master ] paths-ignore: + - '.github/ISSUE_TEMPLATE/*' + - 'etc/**' - .git-blame-ignore-revs + - .github/pull_request_template.md - .gitignore - CONTRIBUTING.md - COPYING @@ -12,14 +15,14 @@ on: - README.md - RELNOTES - SECURITY.md - - 'etc/**' - - 'src/firecfg/firecfg.config' - - '.github/ISSUE_TEMPLATE/*' - - '.github/pull_request_template.md' + - src/firecfg/firecfg.config pull_request: branches: [ master ] paths-ignore: + - '.github/ISSUE_TEMPLATE/*' + - 'etc/**' - .git-blame-ignore-revs + - .github/pull_request_template.md - .gitignore - CONTRIBUTING.md - COPYING @@ -27,10 +30,7 @@ on: - README.md - RELNOTES - SECURITY.md - - 'etc/**' - - 'src/firecfg/firecfg.config' - - '.github/ISSUE_TEMPLATE/*' - - '.github/pull_request_template.md' + - src/firecfg/firecfg.config permissions: # added using https://github.com/step-security/secure-workflows contents: read diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2190c9a1d..85110c17e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,6 +9,7 @@ on: push: branches: [ master ] paths-ignore: + - 'etc/**' - .git-blame-ignore-revs - .gitignore - CONTRIBUTING.md @@ -17,11 +18,11 @@ on: - README.md - RELNOTES - SECURITY.md - - 'etc/**' pull_request: # The branches below must be a subset of the branches above branches: [ master ] paths-ignore: + - 'etc/**' - .git-blame-ignore-revs - .gitignore - CONTRIBUTING.md @@ -30,7 +31,6 @@ on: - README.md - RELNOTES - SECURITY.md - - 'etc/**' schedule: - cron: '0 7 * * 2' diff --git a/.github/workflows/profile-checks.yml b/.github/workflows/profile-checks.yml index d36d050ab..17e756685 100644 --- a/.github/workflows/profile-checks.yml +++ b/.github/workflows/profile-checks.yml @@ -4,17 +4,17 @@ on: push: branches: [ master ] paths: - - 'etc/**' - 'ci/check/profiles/**' - - 'src/firecfg/firecfg.config' - - 'contrib/sort.py' + - 'etc/**' + - contrib/sort.py + - src/firecfg/firecfg.config pull_request: branches: [ master ] paths: - - 'etc/**' - 'ci/check/profiles/**' - - 'src/firecfg/firecfg.config' - - 'contrib/sort.py' + - 'etc/**' + - contrib/sort.py + - src/firecfg/firecfg.config permissions: # added using https://github.com/step-security/secure-workflows contents: read -- cgit v1.2.3-54-g00ecf From 78ab34341a4ae94391c594500c74f4d9d63e6904 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Tue, 12 Jul 2022 19:35:32 -0300 Subject: ci: ignore github markdown templates in all workflows Ensure that the following paths are ignored everywhere: - '.github/ISSUE_TEMPLATE/*' - .github/pull_request_template.md To avoid running CI unnecessarily. Currently, they're only ignored on .github/workflows/build-extra.yml. --- .github/workflows/build.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6612e256d..da2bea60f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,9 @@ on: push: branches: [ master ] paths-ignore: + - '.github/ISSUE_TEMPLATE/*' - .git-blame-ignore-revs + - .github/pull_request_template.md - .gitignore - CONTRIBUTING.md - COPYING @@ -15,7 +17,9 @@ on: pull_request: branches: [ master ] paths-ignore: + - '.github/ISSUE_TEMPLATE/*' - .git-blame-ignore-revs + - .github/pull_request_template.md - .gitignore - CONTRIBUTING.md - COPYING diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 85110c17e..fa1ecfb84 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,8 +9,10 @@ on: push: branches: [ master ] paths-ignore: + - '.github/ISSUE_TEMPLATE/*' - 'etc/**' - .git-blame-ignore-revs + - .github/pull_request_template.md - .gitignore - CONTRIBUTING.md - COPYING @@ -22,8 +24,10 @@ on: # The branches below must be a subset of the branches above branches: [ master ] paths-ignore: + - '.github/ISSUE_TEMPLATE/*' - 'etc/**' - .git-blame-ignore-revs + - .github/pull_request_template.md - .gitignore - CONTRIBUTING.md - COPYING -- cgit v1.2.3-54-g00ecf From 59da0f26425dc6c7540b083a63510ac86868c634 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Tue, 12 Jul 2022 20:23:51 -0300 Subject: ci: ignore dependabot and gitlab-ci in all workflows Ensure that the following files are ignored everywhere: - .github/dependabot.yml - .gitlab-ci.yml To avoid running CI unnecessarily. --- .github/workflows/build-extra.yml | 4 ++++ .github/workflows/build.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml index f61e41797..1b1855a1f 100644 --- a/.github/workflows/build-extra.yml +++ b/.github/workflows/build-extra.yml @@ -7,8 +7,10 @@ on: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' - .git-blame-ignore-revs + - .github/dependabot.yml - .github/pull_request_template.md - .gitignore + - .gitlab-ci.yml - CONTRIBUTING.md - COPYING - README @@ -22,8 +24,10 @@ on: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' - .git-blame-ignore-revs + - .github/dependabot.yml - .github/pull_request_template.md - .gitignore + - .gitlab-ci.yml - CONTRIBUTING.md - COPYING - README diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da2bea60f..172758399 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,10 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/*' - .git-blame-ignore-revs + - .github/dependabot.yml - .github/pull_request_template.md - .gitignore + - .gitlab-ci.yml - CONTRIBUTING.md - COPYING - README @@ -19,8 +21,10 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/*' - .git-blame-ignore-revs + - .github/dependabot.yml - .github/pull_request_template.md - .gitignore + - .gitlab-ci.yml - CONTRIBUTING.md - COPYING - README diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fa1ecfb84..b374b976c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,8 +12,10 @@ on: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' - .git-blame-ignore-revs + - .github/dependabot.yml - .github/pull_request_template.md - .gitignore + - .gitlab-ci.yml - CONTRIBUTING.md - COPYING - README @@ -27,8 +29,10 @@ on: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' - .git-blame-ignore-revs + - .github/dependabot.yml - .github/pull_request_template.md - .gitignore + - .gitlab-ci.yml - CONTRIBUTING.md - COPYING - README -- cgit v1.2.3-54-g00ecf From a057c1ee4cb27163dbda9fe5b04730198f6b909a Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Tue, 12 Jul 2022 19:37:10 -0300 Subject: ci: ignore codeql workflow file in other workflows Ensure that the following file is ignored everywhere, except on its own workflow: - .github/workflows/codeql-analysis.yml To avoid running CI unnecessarily. This should also make the CI checks finish faster on most PRs opened by dependabot, as they're often only about bumping the version of codeql-action and are opened about once a week (see .github/dependabot.yml). --- .github/workflows/build-extra.yml | 2 ++ .github/workflows/build.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml index 1b1855a1f..9ac991fea 100644 --- a/.github/workflows/build-extra.yml +++ b/.github/workflows/build-extra.yml @@ -9,6 +9,7 @@ on: - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md + - .github/workflows/codeql-analysis.yml - .gitignore - .gitlab-ci.yml - CONTRIBUTING.md @@ -26,6 +27,7 @@ on: - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md + - .github/workflows/codeql-analysis.yml - .gitignore - .gitlab-ci.yml - CONTRIBUTING.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 172758399..3119f59b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md + - .github/workflows/codeql-analysis.yml - .gitignore - .gitlab-ci.yml - CONTRIBUTING.md @@ -23,6 +24,7 @@ on: - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md + - .github/workflows/codeql-analysis.yml - .gitignore - .gitlab-ci.yml - CONTRIBUTING.md -- cgit v1.2.3-54-g00ecf From e2c7abb9252b4456ace278ac69fe881831261d6e Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Wed, 3 Aug 2022 18:38:46 -0300 Subject: ci: ignore firecfg.config in the codeql workflow Ignore the following file: - src/firecfg/firecfg.config To avoid running CodeQL when only adding a new profile. Note: This is already ignored on .github/workflows/build-extra.yml since commit 23ea15fd7 ("Add some more paths-ignore to build-extra.yml", 2021-04-24). Misc: I noticed this on #5289. --- .github/workflows/codeql-analysis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b374b976c..1c6d5e5e3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,6 +22,7 @@ on: - README.md - RELNOTES - SECURITY.md + - src/firecfg/firecfg.config pull_request: # The branches below must be a subset of the branches above branches: [ master ] @@ -39,6 +40,7 @@ on: - README.md - RELNOTES - SECURITY.md + - src/firecfg/firecfg.config schedule: - cron: '0 7 * * 2' -- cgit v1.2.3-54-g00ecf From 2499a3be219d86b262fc24f04d57d1529cfe6bb8 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Fri, 5 Aug 2022 19:42:06 -0300 Subject: ci: ignore man/vim paths in build-extra/codeql workflows Ignore the following paths: - 'contrib/vim/**' - 'src/man/*.txt' To avoid running CI unnecessarily. Note: build-extra essentially only builds with clang and runs linters on the C code, so changes to the man pages and vim files should not affect the result. Do not ignore them on .github/workflows/build.yml because they are part of DISTFILES (see the root Makefile). Misc: I noticed this on #5296 (man pages). --- .github/workflows/build-extra.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml index 9ac991fea..e9ec436a4 100644 --- a/.github/workflows/build-extra.yml +++ b/.github/workflows/build-extra.yml @@ -6,6 +6,8 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' + - 'contrib/vim/**' + - 'src/man/*.txt' - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md @@ -24,6 +26,8 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' + - 'contrib/vim/**' + - 'src/man/*.txt' - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1c6d5e5e3..ad19c9530 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,6 +11,8 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' + - 'contrib/vim/**' + - 'src/man/*.txt' - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md @@ -29,6 +31,8 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/*' - 'etc/**' + - 'contrib/vim/**' + - 'src/man/*.txt' - .git-blame-ignore-revs - .github/dependabot.yml - .github/pull_request_template.md -- cgit v1.2.3-54-g00ecf