From 5fa9491b1822014a9338ba31c13eac36677e5ebb Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 13 Feb 2025 00:02:53 +0100 Subject: [PATCH] [no-relnote] ci reuses basic checks Signed-off-by: Evan Lezar --- .github/workflows/basic-checks.yaml | 30 ++++++++++++++++++++++------- .github/workflows/ci.yaml | 20 ++++++------------- .github/workflows/on-pr.yaml | 19 ------------------ 3 files changed, 29 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/on-pr.yaml diff --git a/.github/workflows/basic-checks.yaml b/.github/workflows/basic-checks.yaml index 96021c4a8..8f8ea9183 100644 --- a/.github/workflows/basic-checks.yaml +++ b/.github/workflows/basic-checks.yaml @@ -2,24 +2,40 @@ name: "basic checks" on: workflow_call: - inputs: + outputs: + version: + description: "The short SHA to use as a version string" + value: ${{ jobs.variables.outputs.version }} golang_version: - required: true - type: string + description: "The golang version for this project" + value: ${{ jobs.variables.outputs.golang_version }} + pull_request: + types: + - opened + - synchronize + branches: + - main + - release-* jobs: - code-scanning: - uses: ./.github/workflows/code_scanning.yaml - with: - golang_version: ${{ needs.variables.outputs.golang_version }} + variables: + uses: ./.github/workflows/variables.yaml golang: + needs: + - variables uses: ./.github/workflows/golang.yaml with: golang_version: ${{ needs.variables.outputs.golang_version }} helm: + needs: + - variables uses: ./.github/workflows/helm.yaml with: golang_version: ${{ needs.variables.outputs.golang_version }} + code-scanning: + uses: ./.github/workflows/code_scanning.yaml + with: + golang_version: ${{ needs.variables.outputs.golang_version }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 53427c78e..b79e57413 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,32 +22,24 @@ on: - release-* jobs: - variables: - uses: ./.github/workflows/variables.yaml - - checks: - needs: - - variables + basic: uses: ./.github/workflows/basic-checks.yaml - with: - golang_version: ${{ needs.variables.outputs.golang_version }} image: uses: ./.github/workflows/image.yaml needs: - - variables - - checks + - basic secrets: inherit with: - version: ${{ needs.variables.outputs.version }} + version: ${{ needs.basic.outputs.version }} build_multi_arch_images: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release-') }} e2e-test: needs: - image - - variables + - basic secrets: inherit uses: ./.github/workflows/e2e.yaml with: - version: ${{ needs.variables.outputs.version }} - golang_version: ${{ needs.variables.outputs.golang_version }} + version: ${{ needs.basic.outputs.version }} + golang_version: ${{ needs.basic.outputs.golang_version }} diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml deleted file mode 100644 index ab9c5df32..000000000 --- a/.github/workflows/on-pr.yaml +++ /dev/null @@ -1,19 +0,0 @@ -on: - pull_request: - types: - - opened - - synchronize - branches: - - main - - release-* - -jobs: - variables: - uses: ./.github/workflows/variables.yaml - - checks: - needs: - - variables - uses: ./.github/workflows/basic-checks.yaml - with: - golang_version: ${{ needs.variables.outputs.golang_version }}