From 9225d5d01026f759532d00ff7c89a7915f0bac47 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 | 27 ++++++++++++++++++++------- .github/workflows/ci.yaml | 16 ++++------------ .github/workflows/on-pr.yaml | 19 ------------------- 3 files changed, 24 insertions(+), 38 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..63d8ee621 100644 --- a/.github/workflows/basic-checks.yaml +++ b/.github/workflows/basic-checks.yaml @@ -2,16 +2,25 @@ 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: uses: ./.github/workflows/golang.yaml @@ -23,3 +32,7 @@ jobs: 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..09a2f240f 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 uses: ./.github/workflows/basic-checks.yaml - with: - golang_version: ${{ needs.variables.outputs.golang_version }} image: uses: ./.github/workflows/image.yaml needs: - - variables - checks secrets: inherit with: - version: ${{ needs.variables.outputs.version }} + version: ${{ needs.checks.outputs.version }} build_multi_arch_images: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release-') }} e2e-test: needs: - image - - variables + - checks secrets: inherit uses: ./.github/workflows/e2e.yaml with: - version: ${{ needs.variables.outputs.version }} - golang_version: ${{ needs.variables.outputs.golang_version }} + version: ${{ needs.checks.outputs.version }} + golang_version: ${{ needs.checks.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 }}