Skip to content

Commit ec16c7b

Browse files
committed
try-somethingelse
Signed-off-by: Yuri Shkuro <[email protected]>
1 parent c0caeb7 commit ec16c7b

File tree

1 file changed

+41
-29
lines changed

1 file changed

+41
-29
lines changed

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

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,52 @@ description: 'Install Go Tip toolchain'
44
runs:
55
using: "composite"
66
steps:
7-
- name: Download Go Tip
8-
id: download
9-
shell: bash
10-
run: |
11-
echo Download Go Tip
12-
set -euo pipefail
13-
tip=$(git ls-remote https://github.com/golang/go.git refs/heads/master | awk '{print $1;}')
14-
echo "Go Tip version: ${tip}"
15-
retries=3
16-
wait_time=10
17-
success=false
18-
for ((i=1; i<=retries; i++)); do
19-
url="https://storage.googleapis.com/go-build-snap/go/linux-amd64/${tip}.tar.gz"
20-
if curl -fsSL -o gotip.tar.gz "$url"; then
21-
success=true
22-
break
23-
fi
24-
echo "Failed to download. Retrying in $wait_time seconds..."
25-
sleep $wait_time
26-
done
27-
echo "success=${success}" >> $GITHUB_OUTPUT
7+
# - name: Download Go Tip
8+
# id: download
9+
# shell: bash
10+
# run: |
11+
# set -euo pipefail
12+
# tip=$(git ls-remote https://github.com/golang/go.git refs/heads/master | awk '{print $1;}')
13+
# echo "Go Tip version: ${tip}"
14+
# retries=3
15+
# wait_time=10
16+
# success=false
17+
# for ((i=1; i<=retries; i++)); do
18+
# url="https://storage.googleapis.com/go-build-snap/go/linux-amd64/${tip}.tar.gz"
19+
# if curl -fsSL -o gotip.tar.gz "$url"; then
20+
# success=true
21+
# break
22+
# fi
23+
# echo "Failed to download. Retrying in $wait_time seconds..."
24+
# sleep $wait_time
25+
# done
26+
# echo "success=${success}" >> $GITHUB_OUTPUT
2827

29-
- name: Unpack gotip bundle
30-
if: steps.download.outputs.success == 'true'
28+
# - name: Unpack gotip bundle
29+
# if: steps.download.outputs.success == 'true'
30+
# shell: bash
31+
# run: |
32+
# echo Unpack gotip bundle
33+
# set -euo pipefail
34+
# echo "Downloaded bundle:"
35+
# ls -lah gotip.tar.gz
36+
# export GOROOT="$HOME/sdk/gotip"
37+
# mkdir -p $GOROOT
38+
# tar -C $GOROOT -xzf gotip.tar.gz
39+
# echo "GOROOT=$GOROOT" >> $GITHUB_ENV
40+
41+
- name: Download pre-built Go tip from grafana/gotip repo
42+
id: download
3143
shell: bash
3244
run: |
33-
echo Unpack gotip bundle
34-
set -euo pipefail
35-
echo "Downloaded bundle:"
36-
ls -lah gotip.tar.gz
45+
gh release download ubuntu-latest --repo grafana/gotip --pattern 'go*.zip'
46+
unzip go.zip -d $HOME/sdk
3747
export GOROOT="$HOME/sdk/gotip"
38-
mkdir -p $GOROOT
39-
tar -C $GOROOT -xzf gotip.tar.gz
4048
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
49+
# echo "GOPATH=$HOME/go" >> "$GITHUB_ENV"
50+
# echo "$HOME/go/bin" >> "$GITHUB_PATH"
51+
# echo "$HOME/sdk/gotip/bin" >> "$GITHUB_PATH"
52+
echo "success=${success}" >> $GITHUB_OUTPUT
4153
4254
# If download failed, we will try to build tip from source.
4355
# This requires Go toolchain, so install it first.

0 commit comments

Comments
 (0)