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

[Feature] Git version dependency #564

Closed
2 tasks done
wico-silva opened this issue Aug 8, 2022 · 1 comment · Fixed by #572
Closed
2 tasks done

[Feature] Git version dependency #564

wico-silva opened this issue Aug 8, 2022 · 1 comment · Fixed by #572
Labels
enhancement New feature or request

Comments

@wico-silva
Copy link

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

I'm using self-hosted runners on a machine with Ubuntu 18.04. The default git version is 2.17. When using this action I kept seeing the following errors:

Error: Unable to locate the current sha: ...
Error: You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage
Error: Process completed with exit code 1.

I tried 'fetch-depth: 0' and 'fetch-depth: 2' and was still getting the same error. Tuns out git version 2.17 doesn't have the command git rev-parse (https://github.com/tj-actions/changed-files/blob/main/diff-sha.sh#L35). Updating git to the latest version fixed the problem.

Describe the solution you'd like?

Two things come to mind:

  • Specify the minimum required git version in the README
  • Check that the git version is above the minimum and raise a better error message if it's not

Describe alternatives you've considered?

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@wico-silva wico-silva added the enhancement New feature or request label Aug 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

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

jackton1 added a commit that referenced this issue Aug 13, 2022
jackton1 added a commit that referenced this issue Aug 13, 2022
* feat: validate the minimum required git version

Closes: #564

* Update diff-sha.sh

* Update diff-sha.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update diff-sha.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant