mirror of
https://github.com/actions/setup-go.git
synced 2025-07-02 05:53:44 +00:00
Add JSON output of go env
and some env as strings
Additional outputs are: - GOPATH as `go-path` string - GOMOD as `go-mod` string - GOCACHE as `go-cache` string - GOMODCACHE as `go-mod-cache` string - `go env` as `go-env` JSON
This commit is contained in:
parent
c4c1141886
commit
18710d65d4
5 changed files with 112 additions and 12 deletions
24
.github/workflows/outputs.yml
vendored
Normal file
24
.github/workflows/outputs.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: Test outputs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
setup-go-env:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: setup-go
|
||||
uses: ./
|
||||
- run: |
|
||||
echo GOPATH=${{ steps.setup-go.outputs.go-path }}
|
||||
echo GOMOD=${{ steps.setup-go.outputs.go-mod }}
|
||||
echo GOMODCACHE=${{ steps.setup-go.outputs.go-mod-cache }}
|
||||
echo GOVERSION=${{ steps.setup-go.outputs.go-version }}
|
||||
echo GOCACHE=${{ steps.setup-go.outputs.go-cache }}
|
||||
|
||||
echo Go environment variables json:
|
||||
jq . <<< '${{ steps.setup-go.outputs.go-env }}'
|
Loading…
Add table
Add a link
Reference in a new issue