@@ -8,57 +8,25 @@ inputs:
8
8
runs :
9
9
using : " composite"
10
10
steps :
11
- # - name: Download Go Tip
12
- # id: download
13
- # shell: bash
14
- # run: |
15
- # set -euo pipefail
16
- # tip=$(git ls-remote https://github.com/golang/go.git refs/heads/master | awk '{print $1;}')
17
- # echo "Go Tip version: ${tip}"
18
- # retries=3
19
- # wait_time=10
20
- # success=false
21
- # for ((i=1; i<=retries; i++)); do
22
- # url="https://storage.googleapis.com/go-build-snap/go/linux-amd64/${tip}.tar.gz"
23
- # if curl -fsSL -o gotip.tar.gz "$url"; then
24
- # success=true
25
- # break
26
- # fi
27
- # echo "Failed to download. Retrying in $wait_time seconds..."
28
- # sleep $wait_time
29
- # done
30
- # echo "success=${success}" >> $GITHUB_OUTPUT
31
-
32
- # - name: Unpack gotip bundle
33
- # if: steps.download.outputs.success == 'true'
34
- # shell: bash
35
- # run: |
36
- # echo Unpack gotip bundle
37
- # set -euo pipefail
38
- # echo "Downloaded bundle:"
39
- # ls -lah gotip.tar.gz
40
- # export GOROOT="$HOME/sdk/gotip"
41
- # mkdir -p $GOROOT
42
- # tar -C $GOROOT -xzf gotip.tar.gz
43
- # echo "GOROOT=$GOROOT" >> $GITHUB_ENV
44
-
45
11
- name : Download pre-built Go tip from grafana/gotip repo
46
12
id : download
47
13
shell : bash
48
14
run : |
15
+ set -euo pipefail
49
16
gh release download ubuntu-latest --repo grafana/gotip --pattern 'go*.zip'
17
+ echo "::group::unzip"
50
18
unzip go.zip -d $HOME/sdk
19
+ echo "::endgroup::"
51
20
export GOROOT="$HOME/sdk/gotip"
52
21
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
53
- # echo "GOPATH=$HOME/go" >> "$GITHUB_ENV"
54
- # echo "$HOME/go/bin" >> "$GITHUB_PATH"
55
- # echo "$HOME/sdk/gotip/bin" >> "$GITHUB_PATH"
56
22
echo "success=${success}" >> $GITHUB_OUTPUT
57
23
env :
58
24
GH_TOKEN : ${{ inputs.gh_token }}
59
25
60
26
# If download failed, we will try to build tip from source.
61
27
# This requires Go toolchain, so install it first.
28
+ # However, gotip is picky about the version of Go used to build it,
29
+ # sometimes it requires the latest version, so determine it dynamically.
62
30
- name : Determine latest Go version
63
31
if : steps.download.outputs.success == 'false'
64
32
id : get_go_version
0 commit comments