rossjrw / pr-preview-action

GitHub Action that deploys a pull request preview to GitHub Pages, similar to Vercel and Netlify, and cleans up after itself.
https://github.com/marketplace/actions/deploy-pr-preview
MIT License
255 stars 39 forks source link

fix: use git_ref verbatim in event of tag determination failure #36

Closed boneskull closed 1 year ago

boneskull commented 1 year ago

The action will fail if someone tries to use it with a SHA instead of a tag, e.g., uses: rossjrw/pr-preview-action@9dac5c4777c535516ebf819f93aeadac70f66488 because the script cannot determine the tag from this SHA.

This changes the action to just use the SHA if the tag cannot be determined. Another approach would be to eliminate this script entirely, as it is only used for display of the version in the generated PR comment.

rossjrw commented 1 year ago

Thanks @boneskull. This makes a lot of sense.