File tree Expand file tree Collapse file tree 6 files changed +35
-19
lines changed
Expand file tree Collapse file tree 6 files changed +35
-19
lines changed Original file line number Diff line number Diff line change 1212 modfile : go.mod
1313 - name : Check outputs
1414 run : |
15- test "${{ steps.selftest.outputs.go_version }}" == "1.20 "
15+ test "${{ steps.selftest.outputs.go_version }}" == "1.22.0 "
1616 test "${{ steps.selftest.outputs.go_module }}" == "github.com/pawndev/go-modfile-information"
17+ - name : Self test two digits format
18+ id : selftest_two_digits
19+ uses : ./
20+ with :
21+ modfile : tests/two-digits.go.mod
22+ - name : Check outputs
23+ run : |
24+ test "${{ steps.selftest_two_digits.outputs.go_version }}" == "1.21"
25+ test "${{ steps.selftest_two_digits.outputs.go_module }}" == "github.com/pawndev/go-modfile-information"
Original file line number Diff line number Diff line change 1- FROM golang:1.20 as builder
1+ FROM golang:1.22 as builder
22
33WORKDIR /app
44COPY . /app
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ See the [examples](#examples) for how to use it
1212
1313### Inputs
1414
15- | Input | Description | Default value |
16- | ----------------------------- | --------------------------------- | --------------- |
17- | ` modfile ` | An example mandatory input | go.mod |
15+ | Input | Description | Default value |
16+ | --------- | -------------------------- | ------------- |
17+ | ` modfile ` | An example mandatory input | go.mod |
1818
1919### Outputs
2020
2121| Output | Description |
22- | -------------- | -------------------------- |
22+ | ------------ | ------------------------ |
2323| ` go_version ` | Go version of the module |
2424| ` go_module ` | Go module name |
2525
5050## Testing locally
5151
5252Be sure to have [act](https://github.com/nektos/act) locally and available il your ` $PATH`.
53- And then you can `make test` to launch the project locally.
53+ And then you can `make test` to launch the project locally.
54+
55+ Folder `tests` contains another go.mod file with old version format using only major and minor without the patch number `1.21`.
Original file line number Diff line number Diff line change 11module github.com/pawndev/go-modfile-information
22
3- go 1.20
3+ go 1.22.0
4+
5+ toolchain go1.23.0
46
57require (
6- github.com/sethvargo/go-githubactions v1.1 .0
7- golang.org/x/mod v0.9 .0
8+ github.com/sethvargo/go-githubactions v1.3 .0
9+ golang.org/x/mod v0.21 .0
810)
9-
10- require github.com/sethvargo/go-envconfig v0.8.0 // indirect
Original file line number Diff line number Diff line change 1- github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg =
2- github.com/sethvargo/go-envconfig v0.8.0 h1:AcmdAewSFAc7pQ1Ghz+vhZkilUtxX559QlDuLLiSkdI =
3- github.com/sethvargo/go-envconfig v0.8.0 /go.mod h1:Iz1Gy1Sf3T64TQlJSvee81qDhf7YIlt8GMUX6yyNFs0 =
4- github.com/sethvargo/go-githubactions v1.1.0 h1:mg03w+b+/s5SMS298/2G6tHv8P0w0VhUFaqL1THIqzY =
5- github.com/sethvargo/go-githubactions v1.1.0 /go.mod h1:qIboSF7yq2Qnaw2WXDsqCReM0Lo1gU4QXUWmhBC3pxE =
6- golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs =
7- golang.org/x/mod v0.9.0 /go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs =
1+ github.com/sethvargo/go-githubactions v1.3.0 h1:Kg633LIUV2IrJsqy2MfveiED/Ouo+H2P0itWS0eLh8A =
2+ github.com/sethvargo/go-githubactions v1.3.0 /go.mod h1:7/4WeHgYfSz9U5vwuToCK9KPnELVHAhGtRwLREOQV80 =
3+ golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0 =
4+ golang.org/x/mod v0.21.0 /go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY =
Original file line number Diff line number Diff line change 1+ module github.com/pawndev/go-modfile-information
2+
3+ go 1.21
4+
5+ require (
6+ github.com/sethvargo/go-githubactions v1.3.0
7+ golang.org/x/mod v0.21.0
8+ )
You can’t perform that action at this time.
0 commit comments