From 4fec3092843f562a0ce7e73e2d33205f87ac19d9 Mon Sep 17 00:00:00 2001 From: Dylan Page Date: Thu, 20 Apr 2023 17:51:01 -0400 Subject: [PATCH] fix(ci): fix workflows to run when required to avoid empty required checks (#3342) * fix(ci): fix workflows to run when required to avoid empty required checks --- .github/workflows/atlantis-image.yml | 1 + .github/workflows/codeql-required.yml | 10 ++++++---- .github/workflows/codeql.yml | 11 +++++++---- .github/workflows/lint-required.yml | 8 ++++---- .github/workflows/lint.yml | 8 ++++---- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/atlantis-image.yml b/.github/workflows/atlantis-image.yml index e7a2829a7a..7fad92e81a 100644 --- a/.github/workflows/atlantis-image.yml +++ b/.github/workflows/atlantis-image.yml @@ -12,6 +12,7 @@ on: - 'Dockerfile' - 'docker-entrypoint.sh' - '.github/workflows/atlantis-image.yml' + - '**.go' workflow_dispatch: concurrency: diff --git a/.github/workflows/codeql-required.yml b/.github/workflows/codeql-required.yml index 224850abf0..05736bb69a 100644 --- a/.github/workflows/codeql-required.yml +++ b/.github/workflows/codeql-required.yml @@ -6,8 +6,9 @@ name: "CodeQL" on: push: branches: [ "main" ] - paths: - - '.github/**' + paths-ignore: + - '**.go' + - '**.js' pull_request: # The branches below must be a subset of the branches above types: @@ -16,8 +17,9 @@ on: - synchronize - ready_for_review branches: [ "main" ] - paths: - - '.github/**' + paths-ignore: + - '**.go' + - '**.js' jobs: analyze: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3698a799e7..c2e8665e55 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,8 +14,9 @@ name: "CodeQL" on: push: branches: [ "main" ] - paths-ignore: - - '.github/**' + paths: + - '**.go' + - '**.js' pull_request: # The branches below must be a subset of the branches above types: @@ -24,8 +25,10 @@ on: - synchronize - ready_for_review branches: [ "main" ] - paths-ignore: - - '.github/**' + paths: + - '**.go' + - '**.js' + schedule: - cron: '17 9 * * 5' diff --git a/.github/workflows/lint-required.yml b/.github/workflows/lint-required.yml index c05d3b71ee..2e9a979f4a 100644 --- a/.github/workflows/lint-required.yml +++ b/.github/workflows/lint-required.yml @@ -12,10 +12,10 @@ on: - ready_for_review branches: - "main" - paths: - - 'runatlantis.io/**' - - '.github/**' - - '**.md' + paths-ignore: + - '**.go' + - 'go.*' + - '.github/workflows/linter.yml' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 073a67e15b..38c5c359a0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,10 +9,10 @@ on: - ready_for_review branches: - "main" - paths-ignore: - - 'runatlantis.io/**' - - '.github/**' - - '**.md' + paths: + - '**.go' + - 'go.*' + - '.github/workflows/linter.yml' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}