From e3935f669d32bac5e46b5a40c1895c0afcb953eb Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Tue, 29 Mar 2022 14:10:20 +0100 Subject: [PATCH] Run CI on main only on schedule (#10942) --- .github/workflows/ci.yml | 8 +++++++- .github/workflows/codeql-java-analysis.yml | 2 +- .github/workflows/codeql-js-adapter-analysis.yml | 2 +- .github/workflows/codeql-theme-analysis.yml | 2 +- .github/workflows/operator-ci.yml | 8 +++++++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f7ff455c7a..db56c887d58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,11 @@ name: Keycloak CI -on: [push, pull_request] +on: + push: + branches-ignore: [main] + pull_request: + schedule: + - cron: '0 0 * * *' env: DEFAULT_JDK_VERSION: 11 @@ -13,6 +18,7 @@ concurrency: jobs: build: name: Build + if: ${{ ( github.event_name != 'schedule' ) || ( github.event_name == 'schedule' && github.repository == 'keycloak/keycloak' ) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/codeql-java-analysis.yml b/.github/workflows/codeql-java-analysis.yml index 9b32b0db6e3..c18a35cff68 100644 --- a/.github/workflows/codeql-java-analysis.yml +++ b/.github/workflows/codeql-java-analysis.yml @@ -7,7 +7,7 @@ name: "CodeQL Java" on: push: - branches: [main] + branches-ignore: [main] pull_request: branches: [main] paths: diff --git a/.github/workflows/codeql-js-adapter-analysis.yml b/.github/workflows/codeql-js-adapter-analysis.yml index 1ff93c8c0db..fda1cb93e3d 100644 --- a/.github/workflows/codeql-js-adapter-analysis.yml +++ b/.github/workflows/codeql-js-adapter-analysis.yml @@ -7,7 +7,7 @@ name: "CodeQL JS Adapter" on: push: - branches: [main] + branches-ignore: [main] pull_request: branches: [main] paths: diff --git a/.github/workflows/codeql-theme-analysis.yml b/.github/workflows/codeql-theme-analysis.yml index 09bc75606b3..4a13383b866 100644 --- a/.github/workflows/codeql-theme-analysis.yml +++ b/.github/workflows/codeql-theme-analysis.yml @@ -7,7 +7,7 @@ name: "CodeQL Themes" on: push: - branches: [main] + branches-ignore: [main] pull_request: branches: [main] paths: diff --git a/.github/workflows/operator-ci.yml b/.github/workflows/operator-ci.yml index 51e9a3b001b..aed6947b1eb 100644 --- a/.github/workflows/operator-ci.yml +++ b/.github/workflows/operator-ci.yml @@ -1,6 +1,11 @@ name: Keycloak Operator CI -on: [push, pull_request] +on: + push: + branches-ignore: [main] + pull_request: + schedule: + - cron: '0 0 * * *' env: JDK_VERSION: 11 @@ -13,6 +18,7 @@ concurrency: jobs: build: name: Build + if: ${{ ( github.event_name != 'schedule' ) || ( github.event_name == 'schedule' && github.repository == 'keycloak/keycloak' ) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2