diff --git a/.github/workflows/tf_tests.yml b/.github/workflows/tf_tests.yml index f1cab6f3..1728d81e 100644 --- a/.github/workflows/tf_tests.yml +++ b/.github/workflows/tf_tests.yml @@ -3,6 +3,10 @@ name: TF Tests on: pull_request: types: [opened, reopened, synchronize, closed] + paths: + - "**.yml" + - "scripts/**" + - "tests/**" jobs: tests: @@ -31,9 +35,15 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup TF - uses: opentofu/setup-opentofu@ae80d4ecaab946d8f5ff18397fbf6d0686c6d46a # v1.0.3 - - uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0 + - name: Setup TF (via tenv) + env: + CLI_USES: ${{ matrix.cli_uses }} + CLI_VERSION: ~> 1.6.0 + run: | + VERSION=$(curl --silent https://api.github.com/repos/tofuutils/tenv/releases/latest | jq -r .tag_name) + curl -O -L "https://github.com/tofuutils/tenv/releases/latest/download/tenv_${VERSION}_amd64.deb" + sudo dpkg -i "tenv_${VERSION}_amd64.deb" + tenv $CLI_USES install "$CLI_VERSION" && tenv update-path - name: Provision TF id: tf diff --git a/README.md b/README.md index 951cf039..cd6a1e1f 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,10 @@ Functional workflow examples are provided below, along with associated permissions and triggers. The full list of inputs is documented [below](#inputs). - [TF via PR Comments](.github/examples/tf_via_pr_comments.yml) +- [TF via PR Comments or Input](.github/examples/tf_via_pr_comments_or_input.yml) - [TF via PR Input with AWS Authentication](.github/examples/tf_via_pr_input.yml) - [TF via PR Input with Matrix Strategy](.github/examples/tf_via_pr_input_matrix.yml) -- [TF via PR Comments or Input](.github/examples/tf_via_pr_comments_or_input.yml) +- [TF via PR Input with `tenv` Proxy](.github/workflows/tf_tests.yml) > [!NOTE] >