diff --git a/Taskfile.yml b/Taskfile.yml index 863171d..87201b5 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -15,6 +15,12 @@ vars: GOBIN: sh: | if [ -z "${GOBIN}" ]; then + if [ "$GITHUB_ACTIONS" = "true" ]; then + echo "Running inside a GitHub Actions runner." + echo /home/runner/go/bin + return + fi + echo "GOBIN has not been not set. Ensure that it has been set on the system." exit 1 fi diff --git a/action.yml b/action.yml index 292cb10..ead606f 100644 --- a/action.yml +++ b/action.yml @@ -54,7 +54,7 @@ runs: if: inputs.testing-type == 'component' || inputs.testing-type == 'coverage' || inputs.testing-type == 'integration' || inputs.testing-type == 'lint' || inputs.testing-type == 'unit' shell: bash run: | - if ! ~/go/bin/task --version | grep -q "Task version: ${{ inputs.task-version }}"; then + if ! task --version | grep -q "Task version: ${{ inputs.task-version }}"; then major_version=$(echo "${{ inputs.task-version }}" | sed -E 's/^v([0-9]+).*/\1/') go install github.com/go-task/task/v${major_version}/cmd/task@${{ inputs.task-version }} fi