Skip to content

Commit d13ad7a

Browse files
committed
[no-relnote] ci reuses basic checks
Signed-off-by: Evan Lezar <[email protected]>
1 parent 70fbe8e commit d13ad7a

File tree

3 files changed

+25
-39
lines changed

3 files changed

+25
-39
lines changed

.github/workflows/basic-checks.yaml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@ name: "basic checks"
22

33
on:
44
workflow_call:
5-
inputs:
5+
outputs:
6+
version:
7+
description: "The short SHA to use as a version string"
8+
value: ${{ jobs.variables.outputs.version }}
69
golang_version:
7-
required: true
8-
type: string
10+
description: "The golang version for this project"
11+
value: ${{ jobs.variables.outputs.golang_version }}
12+
pull_request:
13+
types:
14+
- opened
15+
- synchronize
16+
branches:
17+
- main
18+
- release-*
919

1020
jobs:
11-
code-scanning:
12-
uses: ./.github/workflows/code_scanning.yaml
13-
with:
14-
golang_version: ${{ needs.variables.outputs.golang_version }}
21+
22+
variables:
23+
uses: ./.github/workflows/variables.yaml
1524

1625
golang:
1726
uses: ./.github/workflows/golang.yaml
@@ -23,3 +32,7 @@ jobs:
2332
with:
2433
golang_version: ${{ needs.variables.outputs.golang_version }}
2534

35+
code-scanning:
36+
uses: ./.github/workflows/code_scanning.yaml
37+
with:
38+
golang_version: ${{ needs.variables.outputs.golang_version }}

.github/workflows/ci.yaml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,24 @@ on:
2222
- release-*
2323

2424
jobs:
25-
variables:
26-
uses: ./.github/workflows/variables.yaml
27-
2825
checks:
29-
needs:
30-
- variables
31-
uses: ./.github/workflows/basic-checks.yaml
32-
with:
33-
golang_version: ${{ needs.variables.outputs.golang_version }}
26+
uses: ./.github/workflows/on-pr.yaml
3427

3528
image:
3629
uses: ./.github/workflows/image.yaml
3730
needs:
38-
- variables
3931
- checks
4032
secrets: inherit
4133
with:
42-
version: ${{ needs.variables.outputs.version }}
34+
version: ${{ needs.checks.outputs.version }}
4335
build_multi_arch_images: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release-') }}
4436

4537
e2e-test:
4638
needs:
4739
- image
48-
- variables
40+
- checks
4941
secrets: inherit
5042
uses: ./.github/workflows/e2e.yaml
5143
with:
52-
version: ${{ needs.variables.outputs.version }}
53-
golang_version: ${{ needs.variables.outputs.golang_version }}
44+
version: ${{ needs.checks.outputs.version }}
45+
golang_version: ${{ needs.checks.outputs.golang_version }}

.github/workflows/on-pr.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)