maxheld83 / ghactions

GitHub actions for R and accompanying R package
https://www.maxheld.de/ghactions/
MIT License
169 stars 17 forks source link

github actions should expose just branch name #340

Closed maxheld83 closed 4 years ago

maxheld83 commented 5 years ago

Emailed support:

the github.head_ref is a little unwieldy, giving something like 'refs/heads/master'.

I get that that's technically correct, but just "master" would be easier, and is what I guess most users are after.

It's a bit cumbersome having to strsplit the result first.

Perhaps expose something that just gives the branch name as an alternative?

maxheld83 commented 4 years ago

this can now be easily done by github actions expressions

brettstack commented 4 years ago

@maxheld83 could you elaborate? How do you transform refs/head/master into master?

maxheld83 commented 4 years ago

I'm just using some shell action in a separate step; several solutions are listed here: https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions