From f92c6fa358f62741ba71dff20c1915e939f2360a Mon Sep 17 00:00:00 2001 From: Oliver Ford Date: Wed, 14 Jan 2026 17:13:33 +0000 Subject: [PATCH 1/3] Install tenv via tofuutils/setup-tenv Fixes #10. Fixes #14. Signed-off-by: Oliver Ford --- Dockerfile | 21 --------------------- action.yml | 11 +++++++++-- src/tenv-action.sh | 25 ------------------------- 3 files changed, 9 insertions(+), 48 deletions(-) delete mode 100644 Dockerfile delete mode 100644 src/tenv-action.sh diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index d7a0141..0000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright 2024 tofuutils authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -FROM tofuutils/tenv:4.9 -LABEL maintainer="TofuUtils Core Team" - -COPY src/tenv-action.sh /tenv-action.sh -RUN chmod +x /tenv-action.sh -ENTRYPOINT ["/bin/sh", "/tenv-action.sh"] diff --git a/action.yml b/action.yml index 08e3615..9e4c577 100644 --- a/action.yml +++ b/action.yml @@ -31,5 +31,12 @@ outputs: value: "126" runs: - using: "docker" - image: "Dockerfile" + using: "composite" + steps: + - uses: OJFord/setup-tenv@issues/16 + with: + github_token: "${{inputs.github_token}}" + tenv_wrapper: "false" + + - run: "tenv ${{inputs.tool_name}} install ${{inputs.tool_version}}" + shell: "bash" diff --git a/src/tenv-action.sh b/src/tenv-action.sh deleted file mode 100644 index 5b16548..0000000 --- a/src/tenv-action.sh +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright 2024 tofuutils authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -#!/bin/bash -set -e - -TOOL_NAME="${INPUT_TOOL_NAME}" -TOOL_VERSION="${INPUT_TOOL_VERSION}" -GITHUB_TOKEN="${INPUT_GITHUB_TOKEN}" - -export TENV_ROOT=$GITHUB_WORKSPACE/.tenv -mkdir -p ${TENV_ROOT} -tenv ${TOOL_NAME} install ${TOOL_VERSION} From c485721df1855ec74cbf014b4d0bccc0783dd901 Mon Sep 17 00:00:00 2001 From: Oliver Ford Date: Wed, 14 Jan 2026 18:21:05 +0000 Subject: [PATCH 2/3] Use safer default of latest-allowed It doesn't make sense to prefer `latest` to `latest-allowed`, if they're not identical then the former is broken and the latter works. Signed-off-by: Oliver Ford --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9e4c577..2278a13 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,7 @@ inputs: tool_version: description: "" required: false - default: "latest" + default: "latest-allowed" github_token: description: "API token for GitHub to increase the rate limit." default: "" From edaa7e549acbacd4d6fbf5abac73af87edee2210 Mon Sep 17 00:00:00 2001 From: Oliver Ford Date: Wed, 14 Jan 2026 18:38:21 +0000 Subject: [PATCH 3/3] Detect version if not given Partly to work around tofuutils/tenv/#534 in some cases, but convenient generally. Signed-off-by: Oliver Ford --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2278a13..6f61858 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,6 @@ inputs: tool_version: description: "" required: false - default: "latest-allowed" github_token: description: "API token for GitHub to increase the rate limit." default: "" @@ -39,4 +38,9 @@ runs: tenv_wrapper: "false" - run: "tenv ${{inputs.tool_name}} install ${{inputs.tool_version}}" + if: ${{inputs.tool_version != ''}} + shell: "bash" + + - run: "tenv ${{inputs.tool_name}} detect --install" + if: ${{inputs.tool_version == ''}} shell: "bash"