From ece47cd47137fabc858f98fc284755c1e611e5da Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Thu, 7 Mar 2024 20:29:57 -0800 Subject: [PATCH] chore: refactor into reusable workflows Signed-off-by: Sam Gammon --- .github/workflows/ci.yml | 8 ++------ .github/workflows/on.pr.yml | 25 +++++++++++++++++++++++++ .github/workflows/on.push.yml | 25 +++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/on.pr.yml create mode 100644 .github/workflows/on.push.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11300f727446..27f729ad5178 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/on.pr.yml b/.github/workflows/on.pr.yml new file mode 100644 index 000000000000..6d4a9b33f15c --- /dev/null +++ b/.github/workflows/on.pr.yml @@ -0,0 +1,25 @@ +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 + + ## 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 000000000000..537868d4a7b6 --- /dev/null +++ b/.github/workflows/on.push.yml @@ -0,0 +1,25 @@ +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 + + ## Run CodeQL checks + checks-codeql: + name: "Checks" + uses: ./.github/workflows/codeql.yml