This commit is contained in:
parent
09214e49b9
commit
f2ffed2be3
@ -2,12 +2,10 @@ name: "test"
|
||||
run-name: "test"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: [smoketest]
|
||||
runs-on: fire
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -19,9 +17,8 @@ jobs:
|
||||
- name: "run go install script"
|
||||
shell: bash
|
||||
env:
|
||||
GO_INSTALL_COMMANDS: github.com/jake-young-dev/kelp@v0.0.9
|
||||
GO_INSTALL_COMMANDS: code.jakeyoungdev.com/jake/mctl@v0.3.4
|
||||
GO_INSTALL_ARCH: amd64
|
||||
GO_INSTALL_PURGE: no
|
||||
run: |
|
||||
chmod +x install.sh
|
||||
./install.sh
|
||||
@ -32,4 +29,4 @@ jobs:
|
||||
|
||||
- name: "check go installed command"
|
||||
shell: bash
|
||||
run: kelp -v | grep "kelp version v0.0.9"
|
||||
run: mctl -v | grep "mctl version v0.3.4"
|
@ -3,7 +3,7 @@ description: "simple and fast install for golang and golang commands on linux wo
|
||||
inputs:
|
||||
arch:
|
||||
description: "Optional, the linux architecture to use when downloading Go files (default: amd64)"
|
||||
required: true
|
||||
required: false
|
||||
default: "amd64"
|
||||
purge:
|
||||
description: "Optional, deletes any previously installed go versions (yes|no)"
|
||||
|
@ -37,6 +37,12 @@ if [[ "$GO_CHECK" ]]; then
|
||||
sudo rm -r /usr/bin/gofmt
|
||||
else
|
||||
#TODO1: if installed version matches requested version we can consider the job successful
|
||||
#go version go1.23.0 linux/amd64
|
||||
GVC=$(go version)
|
||||
if [[ "$GVC" == "go version go${DL_VERSION} linux/${DL_ARCH}" ]]; then
|
||||
echo "Requested Go version already installed, skipping."
|
||||
exit 0
|
||||
fi
|
||||
echo "FATAL: Go is already installed, set purge to 'yes' if you wish to update installed version"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user