From 07cefe3966357396b54ec63a6d71c1a514e69128 Mon Sep 17 00:00:00 2001 From: sbp-bvanb Date: Fri, 13 Dec 2024 15:22:41 +0100 Subject: [PATCH] fix: Omit ~/go/bin from task --- README.md | 1 + action.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c832f3b..c4a38dd 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ jobs: - unit runs-on: ubuntu-22.04 env: + GOBIN: /home/runner/go/bin TASK_X_REMOTE_TASKFILES: 1 steps: - uses: actions/checkout@v4.1.1 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