This action will let you retrieve some information in your go.mod
file and export it in github action variables.
For now, only the go version
and go module
will be exported.
See the examples for how to use it
Input | Description | Default value |
---|---|---|
modfile |
An example mandatory input | go.mod |
Output | Description |
---|---|
go_version |
Go version of the module |
go_module |
Go module name |
Or see this workflow
...
- name: Get go mod info
id: gomod
uses: pawndev/[email protected]
with:
modfile: go.mod # optional default to `go.mod`
- name: Print go mod information
run: |
echo "${{ steps.gomod.outputs.go_version }}"
echo "${{ steps.gomod.outputs.go_module }}"
with:
modfile: other-go.mod
Be sure to have act locally and available il your $PATH
.
And then you can make test
to launch the project locally.
Folder tests
contains another go.mod file with old version format using only major and minor without the patch number 1.21
.