Skip to content

GitHub Actions doesn’t automatically know where the binary was installed unless it's added to the system PATH #10

Description

@benmthomas

When using tofuutils/tenv-github-action to install a tool (e.g. Terragrunt), the action reports successful installation but the binary isn’t on the runner’s PATH, so subsequent steps fail with:

terragrunt: command not found

To Reproduce

- name: Install Terragrunt
  uses: tofuutils/tenv-github-action@main
  with:
    tool_name: tg
    tool_version: 0.67.15
    github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Run terragrunt
  run: terragrunt --version

Logs show “Installation of Terragrunt 0.67.15 successful” but then:

/home/runner/.../script.sh: line 10: terragrunt: command not found

Expected behaviour:
After installation, the tool’s binary directory (e.g. $GITHUB_WORKSPACE/.tenv/Terragrunt/0.67.15/) should be appended to the runner’s PATH, so that terragrunt (or whatever <tool_name> is) is immediately available.

Actual behavior:
The action does not modify the runner’s PATH. We must manually add the below step:

- run: echo "$GITHUB_WORKSPACE/.tenv/Terragrunt/0.67.15" >> $GITHUB_PATH

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions