Files
ci/setup-go/action.yml
T
ozan 5f0ddc1901 feat: composite actions + runner base image
Actions: checkout, setup-go, setup-node, setup-aws
Runner image: Go 1.26 + Node 22 + AWS CLI + Docker (docker:29-dind)
2026-05-22 17:52:08 +01:00

31 lines
889 B
YAML

name: 'Tinqs Setup Go'
description: 'Install Go and configure PATH (replaces actions/setup-go)'
inputs:
go-version:
description: 'Go version to install'
default: '1.26.2'
runs:
using: 'composite'
steps:
- run: |
GO_VERSION="${{ inputs.go-version }}"
# Skip if already installed at correct version
if command -v go &>/dev/null; then
CURRENT=$(go version | grep -oP '\d+\.\d+\.\d+' || true)
if [ "$CURRENT" = "$GO_VERSION" ]; then
echo "Go $GO_VERSION already installed"
go version
exit 0
fi
fi
echo "Installing Go $GO_VERSION..."
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
export PATH="/usr/local/go/bin:$PATH"
go version
shell: bash