Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 35a6e0c

Browse files
committed
build: use a re-usable, single, workflow for running CI
As a way to keep updates to the CI pipelines more straightforward, we can extract this out to a shared, versioned (and updated by Renovate) Action. We can make sure to keep our binary builds going, but only for the current versions of Go - other build failures will be caught by our shared Action.
1 parent b0f22a0 commit 35a6e0c

4 files changed

Lines changed: 13 additions & 177 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
name: Build project
2-
on: [ push, pull_request ]
3-
1+
name: CI
2+
on:
3+
push: {}
4+
pull_request: {}
5+
workflow_dispatch: {}
46
permissions:
57
contents: read
6-
78
jobs:
89
build:
9-
name: Build
10+
uses: oapi-codegen/actions/.github/workflows/ci.yml@b9f2c274c1c631e648931dbbcc1942c2b2027837 # v0.4.0
11+
12+
build-binaries:
1013
runs-on: ubuntu-latest
1114
strategy:
12-
fail-fast: false
13-
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
15+
fail-fast: true
1416
matrix:
1517
version:
16-
- "1.22"
17-
- "1.23"
18-
- "1.24"
19-
- "1.25"
18+
- "stable"
19+
- "oldstable"
2020
steps:
2121
- name: Check out source code
2222
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -26,25 +26,8 @@ jobs:
2626
with:
2727
go-version: ${{ matrix.version }}
2828

29-
- name: Test
30-
run: make test
29+
- name: Build
30+
run: go build ./cmd/oapi-codegen
3131
env:
3232
# A combination of our GitHub Actions setup, with the Go toolchain, leads to inconsistencies in calling `go env`, in particular with Go 1.21, where having (the default) `GOTOOLCHAIN=auto` results in build failures
3333
GOTOOLCHAIN: local
34-
35-
- name: Build
36-
run: go build ./cmd/oapi-codegen
37-
38-
results:
39-
if: ${{ always() }}
40-
runs-on: ubuntu-latest
41-
name: Check build results
42-
needs: [build]
43-
steps:
44-
- run: |
45-
result="${{ needs.build.result }}"
46-
if [[ $result == "success" || $result == "skipped" ]]; then
47-
exit 0
48-
else
49-
exit 1
50-
fi

.github/workflows/generate.yml

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

.github/workflows/lint.yml

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

.github/workflows/tidy.yml

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

0 commit comments

Comments
 (0)