Skip to content

Eun/go-mod-details

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-mod-details


An action that returns details about a go.mod file.

Inputs

modfile

Path to the go.mod file that should be parsed (optional)

Outputs

modfile

Path to the go.mod file that was parsed

go_version

The go version that is defined in the go.mod file

module

The module name defined in the go.mod file

Example

steps:
  -
    name: Checkout code
    uses: actions/checkout@v2
  -
    name: Get go.mod details
    uses: Eun/go-mod-details@v1
    id: go-mod-details
  -
    name: Install Go
    uses: actions/setup-go@v1
    with:
      go-version: ${{ steps.go-mod-details.outputs.go_version }}
  -
    name: Test
    run: go test -v ./...