Closed Confucian-e closed 2 months ago
You workflow is running on tag events, so when you run actions/checkout
you're not checking out a branch, and that's the reason after you make that commit you find yourself in the detached head state.
You need to either checkout out a branch on the actions/checkout
step, or specify which branch you want to push to in the EndBug/add-and-commit
step by using the push
input.
Thank you sir! I switch to run on push events and it works.
Describe the bug I'm using that for generate CHANGELOG and commit it when I push tags. Meet Error: fatal: You are not currently on a branch.
Workflow used https://github.com/Confucian-e/hardhat-template/actions/runs/10210929795/workflow
Expected behavior It should work and commit the CHANGELOG.md which I generated in before step.
Logs https://github.com/Confucian-e/hardhat-template/actions/runs/10210929795/job/28251386119
Logs