From 6348ddae63f7476d6cb8c2949e7d026655e7b090 Mon Sep 17 00:00:00 2001 From: peelz Date: Sat, 27 May 2023 15:29:15 -0400 Subject: [PATCH] Prevent CI from running publish-release for non-code changes --- .github/workflows/on-push-master.yml | 8 +++----- .github/workflows/on-push-other-branch.yml | 8 +++----- .github/workflows/on-update-dot-github.yml | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/on-update-dot-github.yml diff --git a/.github/workflows/on-push-master.yml b/.github/workflows/on-push-master.yml index debce86f5..10584a96d 100644 --- a/.github/workflows/on-push-master.yml +++ b/.github/workflows/on-push-master.yml @@ -5,13 +5,11 @@ name: On push to master branch on: push: branches: [master] + paths-ignore: + - ".github/**" + - "*.md" jobs: - harden-ci-security: - uses: ./.github/workflows/harden-ci-security.yml - with: - ref: ${{ github.event.ref }} - run-tests: uses: ./.github/workflows/run-tests.yml with: diff --git a/.github/workflows/on-push-other-branch.yml b/.github/workflows/on-push-other-branch.yml index 3125819ac..fb75d656f 100644 --- a/.github/workflows/on-push-other-branch.yml +++ b/.github/workflows/on-push-other-branch.yml @@ -5,13 +5,11 @@ name: On push to a secondary branch on: push: branches-ignore: [master] + paths-ignore: + - ".github/**" + - "*.md" jobs: - harden-ci-security: - uses: ./.github/workflows/harden-ci-security.yml - with: - ref: ${{ github.event.ref }} - run-tests: uses: ./.github/workflows/run-tests.yml with: diff --git a/.github/workflows/on-update-dot-github.yml b/.github/workflows/on-update-dot-github.yml new file mode 100644 index 000000000..767252936 --- /dev/null +++ b/.github/workflows/on-update-dot-github.yml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: On changes to .github + +on: + push: + paths-ignore: + - "./.github/**" + +jobs: + harden-ci-security: + uses: ./.github/workflows/harden-ci-security.yml + with: + ref: ${{ github.event.ref }}