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

misleading error: Please run actions/checkout before this action #2254

Closed
4 tasks done
avielb-navina opened this issue Aug 29, 2024 · 3 comments
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@avielb-navina
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

Hey!
when I tried to use this github action, i was always getting the error:
Please run actions/checkout before this action
even though I was following the documentation.

eventually the root cause for this was even though I was in did in a git repository, i had to do fix as described below:

this is not working:

    - name: Checkout
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Get changed files
      id: changed-files
      uses: tj-actions/changed-files@v45

I was able to fix it only after doing as follows:

    - name: Checkout
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
        clean: true
    - name: Config git
      run: |
        git config --global user.email "[email protected]"
        git config --global user.name "avielb"
        git config --global --add safe.directory /__w/workspace/example-repo
    - name: Get changed files
      id: changed-files
      uses: tj-actions/changed-files@v45

To Reproduce

.

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-22.04

Expected behavior?

.

Relevant log output

Please run actions/checkout before this action

Has all relevant logs been included?

  • I've included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@avielb-navina avielb-navina added the bug Something isn't working label Aug 29, 2024
@tj-actions-bot
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@jackton1
Copy link
Member

jackton1 commented Aug 30, 2024

Hi @avielb-navina. Unfortunately this issue seems to be missing any steps to reproduce the error or related logs required to provide a solution.

Closing this issue for now since it doesn’t include the required information.

@jackton1 jackton1 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@jackton1
Copy link
Member

Hi @avielb-navina, it is also worth noting that this issue is a duplicate of #1948

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

3 participants