-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Output sha
of committed changelog
#200
Comments
Hi, this would be a nice addition to the already existing outputs! In the meantime, here's a manual way to do it: you'll need to set up a step that outputs the current HEAD sha retrieved from git. # ...
- uses: EndBug/add-and-commit@v7
# ...
- id: head_commit
run: echo "::set-output name=commit_sha::$(git rev-parse HEAD)"
shell: bash
- run: echo {{ steps.head_commit.outputs.commit_sha }} Explanation:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry it took me so long to get to this even though it was really easy to implement 😅 @all-contributors please add @CWSites for their idea |
I've put up a pull request to add @CWSites! 🎉 |
Hey @EndBug I appreciate your work here, would you be able to extend the sha output to be the full sha and not just the last 7 characters? I'm trying to use this on other actions which require the full sha. |
In my workflow I'm generating a changelog and using this action to commit the generated code back to my repo. After it's generated I'm creating a release in GitHub and publishing to NPM. Currently my workflow is using the original
sha
prior to this committing files back to my repo which is causing some issues.What I'm looking for here is an output of the
sha
which includes the commit created by this action?The text was updated successfully, but these errors were encountered: