From b589045b0fde572b892b8fe9333e2148f6b28452 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Mon, 14 Aug 2023 19:51:27 -0300 Subject: ci: use path whitelists instead of blacklists That is, replace `paths-ignore` with `paths`. This should reduce the number of unnecessary workflow executions and the frequency at which paths are changed. It also reduces the overall number of paths used. Also, add the missing ci/printenv.sh to the path whitelists. --- .github/workflows/build-extra.yml | 70 +++++++++++++---------------------- .github/workflows/build.yml | 63 +++++++++++++++++-------------- .github/workflows/codeql-analysis.yml | 70 +++++++++++++---------------------- .github/workflows/profile-checks.yml | 2 + 4 files changed, 89 insertions(+), 116 deletions(-) (limited to '.github') diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml index 3fc71a299..f35a7d3d3 100644 --- a/.github/workflows/build-extra.yml +++ b/.github/workflows/build-extra.yml @@ -2,51 +2,33 @@ name: Build-extra CI on: push: - paths-ignore: - - '.github/ISSUE_TEMPLATE/*' - - 'contrib/syntax/**' - - 'contrib/vim/**' - - 'etc/**' - - 'src/man/*.in' - - .git-blame-ignore-revs - - .github/dependabot.yml - - .github/pull_request_template.md - - .github/workflows/build.yml - - .github/workflows/codeql-analysis.yml - - .github/workflows/codespell.yml - - .github/workflows/profile-checks.yml - - .gitignore - - .gitlab-ci.yml - - CONTRIBUTING.md - - COPYING - - README - - README.md - - RELNOTES - - SECURITY.md - - src/firecfg/firecfg.config + paths: + - 'm4/**' + - 'src/**.c' + - 'src/**.h' + - 'src/**.mk' + - 'src/**Makefile' + - .github/workflows/build-extra.yml + - Makefile + - ci/printenv.sh + - config.mk.in + - config.sh.in + - configure + - configure.ac pull_request: - paths-ignore: - - '.github/ISSUE_TEMPLATE/*' - - 'contrib/syntax/**' - - 'contrib/vim/**' - - 'etc/**' - - 'src/man/*.in' - - .git-blame-ignore-revs - - .github/dependabot.yml - - .github/pull_request_template.md - - .github/workflows/build.yml - - .github/workflows/codeql-analysis.yml - - .github/workflows/codespell.yml - - .github/workflows/profile-checks.yml - - .gitignore - - .gitlab-ci.yml - - CONTRIBUTING.md - - COPYING - - README - - README.md - - RELNOTES - - SECURITY.md - - src/firecfg/firecfg.config + paths: + - 'm4/**' + - 'src/**.c' + - 'src/**.h' + - 'src/**.mk' + - 'src/**Makefile' + - .github/workflows/build-extra.yml + - Makefile + - ci/printenv.sh + - config.mk.in + - config.sh.in + - configure + - configure.ac permissions: # added using https://github.com/step-security/secure-workflows contents: read diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 489ed4335..12df38762 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,42 +1,49 @@ name: Build CI +# Note: Keep this list in sync with DISTFILES in ../../Makefile. on: push: - paths-ignore: - - '.github/ISSUE_TEMPLATE/*' - - .git-blame-ignore-revs - - .github/dependabot.yml - - .github/pull_request_template.md - - .github/workflows/build-extra.yml - - .github/workflows/codeql-analysis.yml - - .github/workflows/codespell.yml - - .github/workflows/profile-checks.yml - - .gitignore - - .gitlab-ci.yml - - CONTRIBUTING.md + paths: + - 'contrib/**' + - 'etc/**' + - 'm4/**' + - 'platform/**' + - 'src/**' + - 'test/**' + - .github/workflows/build.yml - COPYING + - Makefile - README - - README.md - RELNOTES - - SECURITY.md + - ci/printenv.sh + - config.mk.in + - config.sh.in + - configure + - configure.ac + - install.sh + - mkdeb.sh + - mketc.sh pull_request: - paths-ignore: - - '.github/ISSUE_TEMPLATE/*' - - .git-blame-ignore-revs - - .github/dependabot.yml - - .github/pull_request_template.md - - .github/workflows/build-extra.yml - - .github/workflows/codeql-analysis.yml - - .github/workflows/codespell.yml - - .github/workflows/profile-checks.yml - - .gitignore - - .gitlab-ci.yml - - CONTRIBUTING.md + paths: + - 'contrib/**' + - 'etc/**' + - 'm4/**' + - 'platform/**' + - 'src/**' + - 'test/**' + - .github/workflows/build.yml - COPYING + - Makefile - README - - README.md - RELNOTES - - SECURITY.md + - ci/printenv.sh + - config.mk.in + - config.sh.in + - configure + - configure.ac + - install.sh + - mkdeb.sh + - mketc.sh 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 344090cfd..a4c4a1146 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,51 +7,33 @@ name: "CodeQL" on: push: - paths-ignore: - - '.github/ISSUE_TEMPLATE/*' - - 'contrib/syntax/**' - - 'contrib/vim/**' - - 'etc/**' - - 'src/man/*.txt' - - .git-blame-ignore-revs - - .github/dependabot.yml - - .github/pull_request_template.md - - .github/workflows/build-extra.yml - - .github/workflows/build.yml - - .github/workflows/codespell.yml - - .github/workflows/profile-checks.yml - - .gitignore - - .gitlab-ci.yml - - CONTRIBUTING.md - - COPYING - - README - - README.md - - RELNOTES - - SECURITY.md - - src/firecfg/firecfg.config + paths: + - 'm4/**' + - 'src/**.c' + - 'src/**.h' + - 'src/**.mk' + - 'src/**Makefile' + - .github/workflows/codeql-analysis.yml + - Makefile + - ci/printenv.sh + - config.mk.in + - config.sh.in + - configure + - configure.ac pull_request: - paths-ignore: - - '.github/ISSUE_TEMPLATE/*' - - 'contrib/syntax/**' - - 'contrib/vim/**' - - 'etc/**' - - 'src/man/*.txt' - - .git-blame-ignore-revs - - .github/dependabot.yml - - .github/pull_request_template.md - - .github/workflows/build-extra.yml - - .github/workflows/build.yml - - .github/workflows/codespell.yml - - .github/workflows/profile-checks.yml - - .gitignore - - .gitlab-ci.yml - - CONTRIBUTING.md - - COPYING - - README - - README.md - - RELNOTES - - SECURITY.md - - src/firecfg/firecfg.config + paths: + - 'm4/**' + - 'src/**.c' + - 'src/**.h' + - 'src/**.mk' + - 'src/**Makefile' + - .github/workflows/codeql-analysis.yml + - Makefile + - ci/printenv.sh + - config.mk.in + - config.sh.in + - configure + - configure.ac schedule: - cron: '0 7 * * 2' diff --git a/.github/workflows/profile-checks.yml b/.github/workflows/profile-checks.yml index c44012768..4768c91a1 100644 --- a/.github/workflows/profile-checks.yml +++ b/.github/workflows/profile-checks.yml @@ -6,6 +6,7 @@ on: - 'ci/check/profiles/**' - 'etc/**' - .github/workflows/profile-checks.yml + - ci/printenv.sh - contrib/sort.py - src/firecfg/firecfg.config pull_request: @@ -13,6 +14,7 @@ on: - 'ci/check/profiles/**' - 'etc/**' - .github/workflows/profile-checks.yml + - ci/printenv.sh - contrib/sort.py - src/firecfg/firecfg.config -- cgit v1.2.3-54-g00ecf