[v10.0/forgejo] chore(ci): Get Go binary from GOROOT instead of hardcoded path (#7073)
Backport: https://codeberg.org/forgejo/forgejo/pulls/6590 Co-authored-by: fnetX <otto@codeberg.org> Co-authored-by: Michael Kriese <michael.kriese@visualon.de> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7073 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
parent
c7bd6f4a3d
commit
6fcb8f646f
|
@ -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}/bin/go env GOMODCACHE')" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "cache=$(su ${RUN_AS_USER} -c '${GOROOT}/bin/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…
Reference in New Issue