gruntwork-io / terragrunt-action

A GitHub Action for installing and running Terragrunt
Apache License 2.0
99 stars 38 forks source link

Terragrunt not available after action #57

Closed J4NS-R closed 5 months ago

J4NS-R commented 5 months ago

Describe the bug After the action completes, the terragrunt executable is no longer available.

Is the terragrunt installation cleaned after the action? Is there a way to disable this?

To Reproduce

jobs:
  my_job:
    runs-on: ubuntu-latest
    steps:
      - name: Terragrunt action
        uses: gruntwork-io/terragrunt-action@v2
        with:
          tf_version: "1.7.5"
          tg_version: "0.56.2"
          tg_dir: "."
          tg_command: '--version'
          tg_add_approve: 0
          tg_comment: 0
        env:
          INPUT_POST_EXEC_1: which terragrunt
      - name: Terragrunt checks
        run: /home/runner/bin/terragrunt hclfmt --terragrunt-check --terragrunt-diff

Expected behavior

The steps following the initial action can execute terragrunt. If not on the $PATH, then at least still available in its bin directory.

Screenshot

image

➡️ Notice that the output of which terragrunt is /home/runner/bin/terragrunt, but trying to execute this path directly fails with "No such file or directory".

Versions

J4NS-R commented 5 months ago

Right, terragrunt runs inside a container. That's why it's not available after the action.