Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal: not a git repository (or any parent up to mount point /github) #102

Open
scott-doyland-burrows opened this issue Feb 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@scott-doyland-burrows
Copy link

scott-doyland-burrows commented Feb 7, 2023

Please see the screenshot:
image

I run a workflow, that calls a reusable workflow, that in turn calls a composite action, and in turn that composite calls the tf docs action. The tf docs action eventually gets run like this:

- name: Terraform docs
   if: github.event_name == 'pull_request'
   uses: terraform-docs/[email protected]
   with:
     working-dir: ./terraform/terraform
     output-method: replace

My repo is checked out to a terraform directory, and in that I have a directory named terraform where the tf code is, like this:

- name: Checkout Code on PR
  if: |
  inputs.CodeCheckout == 'true' &&
  github.event_name == 'pull_request'
  uses: actions/checkout@v3
  with:
    path: terraform
    ref: ${{ github.event.pull_request.head.ref }}

I know the checkout is working OK as I can run terraform itself.

This is running on a ubuntu-latest github hosted runner.

I did some testing and can see the README.md is updated (ran a cat of the file from the github hosted runner after the failed tf docs action).

I have tried various settings for the tf docs action, such as find-dir, altering the working-dir (such as removing the ./ from the directory name), but it always fails with the same issue.

@scott-doyland-burrows scott-doyland-burrows added the bug Something isn't working label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant