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)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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
|
||||
Reference in New Issue
Block a user