Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
EraKin575 committed Jun 13, 2024
1 parent 1c41313 commit 83a6469
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/actions/setup-go-tip/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Inspired by https://github.com/actions/setup-go/issues/21#issuecomment-997208686
name: 'Install Go Tip'
description: 'Install Go Tip toolchain'
runs:
using: "composite"
steps:
- name: Try to download Go Tip
id: try-to-download-go-tip
- name: Download Go Tip
id: download-go-tip
shell: bash
run: |
set -euo pipefail
@@ -25,7 +26,7 @@ runs:
echo "download_status=${success}" >> $GITHUB_OUTPUT
- name: Install Go Tip
if: steps.try-to-download-go-tip.outputs.download_status == 'true'
if: steps.download-go-tip.outputs.download_status == 'true'
shell: bash
run: |
echo "Downloaded bundle:"
@@ -38,21 +39,19 @@ runs:
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
echo "PATH=$PATH" >> $GITHUB_ENV
echo "Active Go version:"
go version
- name: Build Go Tip from source
if: steps.try-to-download-go-tip.outputs.download_status == 'false'
if: steps.download-go-tip.outputs.download_status == 'false'
shell: bash
run: |
go install golang.org/dl/gotip@latest
gotip download
echo "GOROOT=$(go env GOROOT)" >> $GITHUB_ENV
echo "GOTIP_BIN=$(go env GOPATH)/bin/gotip" >> $GITHUB_ENV
- name: Fail if Go Tip is not installed
if: steps.try-to-download-go-tip.outputs.download_status == 'false' && failure()
- name: Check Go Version
shell: bash
run: |
echo "Both downloading and building Go Tip failed."
exit 1
echo "Active Go version:"
go version

0 comments on commit 83a6469

Please sign in to comment.