ad-m / github-push-action

GitHub actions to push back to repository eg. updated code
MIT License
1.21k stars 229 forks source link

fix: update README.md #194

Closed leaftail1880 closed 9 months ago

leaftail1880 commented 9 months ago

Related to #143

When action is used on pull request, github.ref throws error, so github.head_ref should be used

In the linked issue there was message about updating documentation, but that wasn't happened.

leaftail1880 commented 9 months ago

github.head_ref is only available on pull request context, so simple replacing all github.ref to github.head_ref is not the way.

ZPascal commented 9 months ago

Hi @leaftail1880, I've documented it here and 90% of the examples inside the README.md file use the head_ref. I think it's still valid to use only ref in case the workflow is triggered by a push event directly and we should not modify the documentation. From my understanding, it's communicated to use head_ref in case of a PR (It's only available in case of a PR).

Screenshot 2024-02-02 at 11 35 44

leaftail1880 commented 9 months ago

Yes, I didn't notice, thanks for the answer