Closed grossag closed 3 months ago
Thanks for reporting @grossag. Will take a look immediately!
Actually I may be wrong here. I am honestly not sure how my workflow worked before because I wasn't following your instructions in how I use actions/checkout
. I'll investigate and get back to you.
Sorry, it does look like I was doing it wrong. I don't know how it worked before, but I was using it without passing ref: ${{ github.head_ref }}
to actions/checkout
and it was working but isn't anymore. I confirmed that today, neither 5.0.0 nor 5.0.1 work with that code but both work as long as I include the ref:
line that your README recommends.
Sorry for the confusion!
@grossag No problem! Glad you could figure out the root cause of the problem.
I wonder if I was partially confused because of the description in https://github.com/marketplace/actions/git-auto-commit . Would it make sense to change that example code's invocation of actions/checkout
to include ref:
?
@grossag Sounds like a good idea.
Have to double check, if github.head_ref
is filled when the workflow is triggered on push
.
This seems to work fine. The README has been updated: https://github.com/stefanzweifel/git-auto-commit-action/commit/4b8a201e31cadd9829df349894b28c54e6c19fe6
git-auto-commit Version
v5.0.1
Machine Type
Ubuntu (eg. ubuntu-latest)
Bug description
I am using this workflow to use create-github-app-token to get me a token that can be used to write:
If black linting wrote any files, the action successfully pushed the files with the v5.0.0 tag but with the new v5.0.1 tag fails with:
because it checks out the branch before pushing. Is this expected?
Steps to reproduce
I think this can be reproduced with a workflow run on PR that has a vanilla
actions/checkout
run, modifies a file, then uses this action to push the modified codeTried solutions
No response
Example Workflow
Relevant log output