Fix metadata.github.ref on push and tag

This commit is contained in:
Reuben Morais 2020-12-18 23:42:29 +00:00
parent 273d461f6a
commit 9c988c764b

View File

@ -19,7 +19,10 @@ tasks:
then: "tag"
else: "push"
login: ${event.pusher.name}
ref: ${event.ref}
ref:
$if: 'event.ref[:10] == "refs/tags/"'
then: ${event.ref[10:]}
else: ${event.ref[11:]} # then it's refs/heads/...
sha: ${event.after}
clone_url: ${event.repository.clone_url}
in: