mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-20 16:50:28 -05:00
chore(ci): Get Go binary from GOROOT instead of hardcoded path
This commit is contained in:
parent
ccaab19f1b
commit
11b9e0b60e
1 changed files with 3 additions and 2 deletions
|
@ -27,8 +27,9 @@ runs:
|
||||||
- name: "Get go environment information"
|
- name: "Get go environment information"
|
||||||
id: go-environment
|
id: go-environment
|
||||||
run: |
|
run: |
|
||||||
echo "modcache=$(su ${RUN_AS_USER} -c '/opt/hostedtoolcache/go/${GO_VERSION}/x64/bin/go env GOMODCACHE')" >> "$GITHUB_OUTPUT"
|
export GOROOT="$(go env GOROOT)"
|
||||||
echo "cache=$(su ${RUN_AS_USER} -c '/opt/hostedtoolcache/go/${GO_VERSION}/x64/bin/go env GOCACHE')" >> "$GITHUB_OUTPUT"
|
echo "modcache=$(su ${RUN_AS_USER} -c '${GOROOT}/go env GOMODCACHE')" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "cache=$(su ${RUN_AS_USER} -c '${GOROOT}/go env GOCACHE')" >> "$GITHUB_OUTPUT"
|
||||||
env:
|
env:
|
||||||
RUN_AS_USER: ${{ inputs.username }}
|
RUN_AS_USER: ${{ inputs.username }}
|
||||||
GO_VERSION: ${{ steps.go-version.outputs.go-version }}
|
GO_VERSION: ${{ steps.go-version.outputs.go-version }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue