Skip to content

Commit d15b5d9

Browse files
committed
fix
Signed-off-by: Yuri Shkuro <[email protected]>
1 parent fbeff7c commit d15b5d9

File tree

1 file changed

+5
-37
lines changed

1 file changed

+5
-37
lines changed

.github/actions/setup-go-tip/action.yml

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,25 @@ inputs:
88
runs:
99
using: "composite"
1010
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-
4511
- name: Download pre-built Go tip from grafana/gotip repo
4612
id: download
4713
shell: bash
4814
run: |
15+
set -euo pipefail
4916
gh release download ubuntu-latest --repo grafana/gotip --pattern 'go*.zip'
17+
echo "::group::unzip"
5018
unzip go.zip -d $HOME/sdk
19+
echo "::endgroup::"
5120
export GOROOT="$HOME/sdk/gotip"
5221
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"
5622
echo "success=${success}" >> $GITHUB_OUTPUT
5723
env:
5824
GH_TOKEN: ${{ inputs.gh_token }}
5925

6026
# If download failed, we will try to build tip from source.
6127
# 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.
6230
- name: Determine latest Go version
6331
if: steps.download.outputs.success == 'false'
6432
id: get_go_version

0 commit comments

Comments
 (0)