mirror of
https://github.com/actions/setup-go.git
synced 2026-02-12 16:34:46 +08: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:
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 }}'
|
||||
Reference in New Issue
Block a user