diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11300f727446e..27f729ad5178b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,8 @@ name: CI on: - push: - branches: - - master - pull_request: - branches: - - master + workflow_call: {} + workflow_dispatch: {} permissions: contents: read diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6be21cbc81cf5..f4573b064184e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,11 +12,10 @@ name: "CodeQL" on: + workflow_call: {} + workflow_dispatch: {} push: branches: ["master"] - pull_request: - # The branches below must be a subset of the branches above - branches: ["master"] schedule: - cron: "0 0 * * 1" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 8b419a6a39ad7..744b5a7be1b2e 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -1,9 +1,7 @@ name: 'Dependency Graph' on: - pull_request: {} - push: - branches: - - master + workflow_call: { } + workflow_dispatch: { } permissions: contents: read diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index ab739790b00d1..f4e238476e49c 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -1,11 +1,7 @@ name: "Validate Gradle Wrapper" on: - push: - branches: - - master - pull_request: - branches: - - master + workflow_call: {} + workflow_dispatch: {} permissions: contents: read diff --git a/.github/workflows/on.pr.yml b/.github/workflows/on.pr.yml new file mode 100644 index 0000000000000..8d9ef719c2621 --- /dev/null +++ b/.github/workflows/on.pr.yml @@ -0,0 +1,30 @@ +name: PR + +on: + pull_request: + branches: + - master + +permissions: + contents: read + +jobs: + ## Run main CI build and tests. + run-ci: + name: "Build & Test" + uses: ./.github/workflows/ci.yml + + ## Validate the Gradle Wrapper binary + checks-gradle-wrapper: + name: "Checks" + uses: ./.github/workflows/gradle-wrapper-validation.yml + + ## Publish and check the dependency graph. + checks-dependency-graph: + name: "Checks" + uses: ./.github/workflows/dependency-review.yml + + ## Run CodeQL checks + checks-codeql: + name: "Checks" + uses: ./.github/workflows/codeql.yml diff --git a/.github/workflows/on.push.yml b/.github/workflows/on.push.yml new file mode 100644 index 0000000000000..f6143241fc013 --- /dev/null +++ b/.github/workflows/on.push.yml @@ -0,0 +1,20 @@ +name: Push + +on: + push: + branches: + - master + +permissions: + contents: read + +jobs: + ## Run main CI build and tests. + run-ci: + name: "Build & Test" + uses: ./.github/workflows/ci.yml + + ## Publish and check the dependency graph. + checks-dependency-graph: + name: "Checks" + uses: ./.github/workflows/dependency-review.yml