I've got this step:
- name: getSumac
uses: actions/checkout@v2
with:
repository: yma/sumac
ref: ${{ github.ref }}
That works when the action is triggered by pushing a tag. But when a PR is created or updated, github.ref is something like refs/pull/99/merge and the getSumac step fails.
On the command-line, I would run something like $( git describe --tags | grep -Eo '^v[.0-9]+' ) to get the most recent tag. Is there a way to do that in a github action step?