Skip to content

Commit 3eac376

Browse files
authored
Merge pull request #591 from cbosdo/go-bump
Ensure we don't break Debian12 builds
2 parents acc2212 + af9b4b8 commit 3eac376

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/mingo_build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# SPDX-FileCopyrightText: 2025 SUSE LLC
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Build with oldest go
6+
7+
on:
8+
pull_request:
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
release:
14+
types:
15+
- published
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
23+
with:
24+
fetch-tags: true
25+
fetch-depth: 0
26+
27+
- name: Setup Go ${{ matrix.go-version }}
28+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
29+
with:
30+
go-version: '1.19'
31+
32+
- name: Install dependencies
33+
run: |
34+
go get ./...
35+
36+
- name: Compute version
37+
run: |
38+
tag=$(git describe --tags --abbrev=0)
39+
version=$(git describe --tags --abbrev=0 | cut -f 3 -d '-')
40+
offset=$(git rev-list --count ${tag}..)
41+
echo "VERSION=$tag-$offset" >> "$GITHUB_ENV"
42+
43+
- name: Build with oldest go
44+
run: |
45+
mkdir -p ./bin
46+
go build \
47+
-tags nok8s \
48+
-ldflags "-X github.com/uyuni-project/uyuni-tools/shared/utils.Version=${{ env.VERSION }}" \
49+
-o ./bin \
50+
./...
51+
52+
- name: Unit tests with all tags
53+
run: go test -tags nok8s ./...

0 commit comments

Comments
 (0)