Skip to content

Commit 00fc74b

Browse files
committed
ci: added svu tool
* updated README * new tool svu * now badge uses github releases * go.mod badge was messy and unresponsive. Added webhook on repo to notify release events to fury.io * updated go-ctrf-json-reporter * updated released binary * now ships binaries with releases. No longer need go install * added svu installer action * added dependency to go.mod Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
1 parent 2c8f815 commit 00fc74b

File tree

12 files changed

+285
-46
lines changed

12 files changed

+285
-46
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
fetch-depth: 0
2828
-
2929
name: Extract tag message
30-
id: get_message
31-
# git-cliff may or may not pick the current tag message, difficult to tell when
32-
# this works. We extract the tag message explicitly.
30+
id: get-message
31+
# tag message is not retrieved unless with fetch the ref explictly
3332
run: |
33+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3434
MESSAGE=$(git tag -l '${{ github.ref_name }}' --format='%(contents:subject)
3535
3636
%(contents:body)
@@ -41,6 +41,9 @@ jobs:
4141
printenv MESSAGE
4242
echo 'EOF'
4343
} >> "${GITHUB_OUTPUT}"
44+
45+
echo "Message in git tag ${{ github.ref_name }}"
46+
echo "$MESSAGE"
4447
-
4548
name: Generate release notes
4649
id: notes
@@ -52,9 +55,10 @@ jobs:
5255
config: '.cliff.toml'
5356
args: >-
5457
--current
55-
--with-tag-message '${{ steps.get_message.outputs.message }}'
58+
--with-tag-message '${{ steps.get-message.outputs.message }}'
5659
-
5760
name: Create github release
5861
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
5962
with:
6063
body: ${{ steps.notes.outputs.content }}
64+
generate_release_notes: false

.github/workflows/test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
defaults:
11+
run:
12+
shell: bash
13+
1014
jobs:
1115
lint-action:
1216
name: Lint actions
@@ -43,21 +47,18 @@ jobs:
4347
4448
test-action:
4549
name: Test install actions
46-
runs-on: ubuntu-latest
4750
permissions:
4851
contents: read
52+
runs-on: ${{ matrix.os }}
53+
needs: [lint-action]
54+
strategy:
55+
matrix:
56+
os: [ ubuntu-latest, macos-latest, windows-latest ]
4957
steps:
5058
-
5159
name: Checkout repository
5260
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
5361
-
54-
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
55-
# At this moment, one of the installed tools is not released as a binary and requires a go-setup
56-
with:
57-
go-version: stable
58-
check-latest: true
59-
cache: true
60-
-
6162
name: Run install-all action
6263
id: test-action
6364
uses: ./
@@ -68,3 +69,4 @@ jobs:
6869
gotestsum --help
6970
go-junit-report --help
7071
go-ctrf-json-reporter --help
72+
svu --help

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ GitHub Actions used by go-openapi workflows.
1717

1818
## Status
1919

20-
This project is still in a very early stage. It is being actively developed and has not released yet.
20+
These actions are currently used by the CI workflows run at `github.com/go-openapi`.
2121

2222
## Usage
2323

@@ -36,9 +36,19 @@ To use this action in your workflow, reference it using the standard GitHub Acti
3636
- uses: go-openapi/gh-actions/install/go-ctrf-json-reporter@v1
3737
```
3838
39+
## Installed tools
40+
41+
All tools are currently installed using downloaded released binaries.
42+
43+
* [gotestsum](https://github.com/gotestyourself/gotestsum/)
44+
* [go-junit-report](https://github.com/jstemmer/go-junit-report)
45+
* [go-ctrf-json-reporter](https://github.com/ctrf-io/go-ctrf-json-reporter)
46+
* [svu](https://github.com/caarlos0/svu)
47+
3948
## Motivation
4049
41-
This repository currently exposes "installer" actions for some testing go tools and
50+
This repository currently exposes "installer" actions for some testing go tools.
51+
4252
CI workflows may use and pin released actions instead of resorting to a `go install ...@latest`
4353
command.
4454

@@ -78,8 +88,10 @@ This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE).
7888
[codeql-badge]: https://github.com/go-openapi/gh-actions/actions/workflows/codeql.yml/badge.svg
7989
[codeql-url]: https://github.com/go-openapi/gh-actions/actions/workflows/codeql.yml
8090
<!-- Badges: release & docker images -->
81-
[release-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fgh-actions.svg
82-
[release-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fgh-actions
91+
[release-badge]: https://badge.fury.io/gh/go-openapi%2Fgh-actions.svg
92+
[release-url]: https://badge.fury.io/gh/go-openapi%2Fgh-actions
93+
[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fgh-actions.svg
94+
[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fgh-actions
8395
<!-- Badges: code quality -->
8496
[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/gh-actions
8597
[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/gh-actions

action.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,82 @@ name: go-openapi composite action
22
description: |
33
Composite github action for go-openapi workflows.
44
5-
It installs the following test tools from binary releases:
5+
Installs the following test tools from binary releases:
66
77
* gotestsum
88
* go-junit-report
99
* go-ctrf-json-reporter
10+
* svu
1011
1112
Please refer to [the documentation](./README.md).
1213
1314
author: go-openapi
1415

1516
inputs:
17+
install-gotestsum:
18+
default: 'true'
19+
required: false
1620
version-gotestsum:
1721
default: auto
1822
required: false
23+
description: |
24+
The version to install specifically.
25+
Defaults to 'auto': the version currenty released (see go.mod).
26+
install-go-junit-report:
27+
default: 'true'
28+
required: false
1929
version-go-junit-report:
2030
default: auto
2131
required: false
32+
description: |
33+
The version to install specifically.
34+
Defaults to 'auto': the version currenty released (see go.mod).
35+
install-go-ctrf-json-reporter:
36+
default: 'true'
37+
required: false
2238
version-go-ctrf-json-reporter:
2339
default: auto
2440
required: false
41+
description: |
42+
The version to install specifically.
43+
Defaults to 'auto': the version currenty released (see go.mod).
44+
install-svu:
45+
default: 'true'
46+
required: false
47+
version-svu:
48+
default: auto
49+
required: false
50+
description: |
51+
The version to install specifically.
52+
Defaults to 'auto': the version currenty released (see go.mod).
2553
2654
runs:
2755
using: composite
2856
steps:
2957
-
58+
if: ${{ inputs.install-gotestsum == 'true' }}
3059
name: Install gotestsum
3160
uses: ./install/gotestsum
3261
with:
3362
version: ${{ inputs.version-gotestsum }}
3463
-
64+
if: ${{ inputs.install-go-junit-report == 'true' }}
3565
name: Install go-junit-report
3666
uses: ./install/go-junit-report
3767
with:
3868
version: ${{ inputs.version-go-junit-report }}
3969
-
70+
if: ${{ inputs.install-go-ctrf-json-reporter == 'true' }}
4071
name: Install go-ctrf-json-reporter
4172
uses: ./install/go-ctrf-json-reporter
4273
with:
4374
version: ${{ inputs.version-go-ctrf-json-reporter }}
75+
-
76+
if: ${{ inputs.install-svu == 'true' }}
77+
name: Install svu
78+
uses: ./install/svu
79+
with:
80+
version: ${{ inputs.version-go-ctrf-json-reporter }}
4481

4582
branding:
4683
icon: 'package'

get-tool-version.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ case "${tool}" in
1717
gotestsum)
1818
GO_IMPORT_PATH="gotest.tools/gotestsum"
1919
;;
20+
svu)
21+
GO_IMPORT_PATH="github.com/caarlos0/svu"
22+
;;
2023
*)
2124
echo "Unrecognized tool name"
2225
exit 1

go.mod

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
module gh-actions
22

3-
go 1.24.0
3+
go 1.25.3
44

55
require (
6-
github.com/ctrf-io/go-ctrf-json-reporter v0.0.14
6+
github.com/caarlos0/svu/v3 v3.3.0
7+
github.com/ctrf-io/go-ctrf-json-reporter v0.0.15
78
github.com/jstemmer/go-junit-report/v2 v2.1.0
89
gotest.tools/gotestsum v1.13.0
910
)
1011

1112
require (
13+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
1214
github.com/bitfield/gotestdox v0.2.2 // indirect
1315
github.com/dnephin/pflag v1.0.7 // indirect
1416
github.com/fatih/color v1.18.0 // indirect
1517
github.com/fsnotify/fsnotify v1.9.0 // indirect
18+
github.com/gobwas/glob v0.2.3 // indirect
1619
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
1720
github.com/google/uuid v1.6.0 // indirect
18-
github.com/mattn/go-colorable v0.1.13 // indirect
21+
github.com/mattn/go-colorable v0.1.14 // indirect
1922
github.com/mattn/go-isatty v0.0.20 // indirect
20-
golang.org/x/mod v0.27.0 // indirect
21-
golang.org/x/sync v0.17.0 // indirect
22-
golang.org/x/sys v0.36.0 // indirect
23-
golang.org/x/term v0.35.0 // indirect
24-
golang.org/x/text v0.17.0 // indirect
25-
golang.org/x/tools v0.36.0 // indirect
23+
golang.org/x/mod v0.30.0 // indirect
24+
golang.org/x/sync v0.18.0 // indirect
25+
golang.org/x/sys v0.38.0 // indirect
26+
golang.org/x/term v0.37.0 // indirect
27+
golang.org/x/text v0.31.0 // indirect
28+
golang.org/x/tools v0.39.0 // indirect
2629
)

go.sum

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1+
github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
2+
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
3+
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
4+
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
15
github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE=
26
github.com/bitfield/gotestdox v0.2.2/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY=
7+
github.com/caarlos0/svu/v3 v3.0.0 h1:nuKoqZKG1jHEq/RyKpsLKCcUHI2Uw/ZwBOfhq+x36AU=
8+
github.com/caarlos0/svu/v3 v3.0.0/go.mod h1:aqzsE84JVirxxkIS1tzfilxmuHkkXu3FUfdGkbTlORE=
9+
github.com/caarlos0/svu/v3 v3.3.0 h1:zjG8BQd5tWlr5kjqh5uJBnBEoNp0GfvFxGBIHgUcrjc=
10+
github.com/caarlos0/svu/v3 v3.3.0/go.mod h1:WtAu3yAuNo4zOkvHxp4bk/RgFc8OCt+Tr/A7OtOK51M=
311
github.com/ctrf-io/go-ctrf-json-reporter v0.0.14 h1:/Yyx+wedA4i62+M1r+/LLNIJ0XK8GV/y7CUTVq/JMcg=
412
github.com/ctrf-io/go-ctrf-json-reporter v0.0.14/go.mod h1:36bVomyu0b70mpxgIQVllRXYyQFPSS+CeHZTn7zxYzQ=
5-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
6-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
13+
github.com/ctrf-io/go-ctrf-json-reporter v0.0.15 h1:dnlUISSw50Mwz1ZME4kqF4rNF+JWFqs0kQ+oaJGJShw=
14+
github.com/ctrf-io/go-ctrf-json-reporter v0.0.15/go.mod h1:36bVomyu0b70mpxgIQVllRXYyQFPSS+CeHZTn7zxYzQ=
15+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
16+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
717
github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk=
818
github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE=
919
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
1020
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
1121
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
1222
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
23+
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
24+
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
1325
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1426
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
1527
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
@@ -21,29 +33,43 @@ github.com/jstemmer/go-junit-report/v2 v2.1.0 h1:X3+hPYlSczH9IMIpSC9CQSZA0L+BipY
2133
github.com/jstemmer/go-junit-report/v2 v2.1.0/go.mod h1:mgHVr7VUo5Tn8OLVr1cKnLuEy0M92wdRntM99h7RkgQ=
2234
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
2335
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
36+
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
37+
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
2438
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
2539
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
2640
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
27-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
28-
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
41+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
42+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2943
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
3044
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
31-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
32-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
45+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
46+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
3347
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
3448
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
49+
golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk=
50+
golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc=
3551
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
3652
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
53+
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
54+
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
3755
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3856
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3957
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
4058
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
59+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
60+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
4161
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
4262
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
63+
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
64+
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
4365
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
4466
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
67+
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
68+
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
4569
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
4670
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
71+
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
72+
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
4773
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
4874
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
4975
gotest.tools/gotestsum v1.13.0 h1:+Lh454O9mu9AMG1APV4o0y7oDYKyik/3kBOiCqiEpRo=

0 commit comments

Comments
 (0)