Closed campbecf closed 4 years ago
there are 2 problems causing this to fail,
the first one is CIRCLE_BRANCH
has empty value (when CIRCLE_TAG
has it)...
The second problem (more importantly), there will be miss-matching references... changing the value of the parameters.branch
to eq $CIRCLE_TAG
or even $CIRCLE_TAG^{}
isn't guaranteed to work...
because the :master
part on heroku will try to infer what is the pushed reference... and since it will find the <src>
reference is a tag, it'll try to create the tag on <dest>
which will succeed but won't trigger any deployment
(Ref: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-push.html check <refspec>
docs)
Writing objects: 100% (2058/2058), 1.54 MiB | 882.00 KiB/s, done.
Total 2058 (delta 1189), reused 280 (delta 143), pack-reused 0
remote: Pushed to branch other than [main, master], skipping build.
To https://git.heroku.com/XXXXXXXXXXXX.git
* [new tag] v2.0.0 -> main
(it creates a tag on heroku remote called main, not pushing to the heroku branch, denoted by * [new tag]
in logs)
for this to work, the <dest>
has always to be refs/heads/master
(or refs/heads/main
) otherwise it'll be ignored by heroku
Ref: https://devcenter.heroku.com/articles/git#deploying-code
Orb Version 1.0.1
Describe the bug
When using a tag to trigger a deployment the deploy-via-git command fails with the following message:
To Reproduce
Trigger a deployment via a tag.
Expected behavior
Should deploy the tag.
Additional context
I believe this has to do with the CIRCLE_TAG variable being set but not CIRCLE_BRANCH ?