Skip to content

Commit

Permalink
[no-relnote] ci reuses basic checks
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Feb 12, 2025
1 parent 70fbe8e commit 9225d5d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 38 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/basic-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
16 changes: 4 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
19 changes: 0 additions & 19 deletions .github/workflows/on-pr.yaml

This file was deleted.

0 comments on commit 9225d5d

Please sign in to comment.