compas-rrc / compas_rrc_ros

ROS Package for the COMPAS RRC driver for ABB robots
MIT License
3 stars 4 forks source link

don't tag alpha/rc etc latest #11

Closed tetov closed 1 year ago

tetov commented 1 year ago

Realized that if a tag such as v1.2.3-alpha would be pushed to git then this workflow would tag that as latest image and push to dockerhub.

Since latest on dockerhub basically means latest stable that would not make sense. I've added tags to the docker/metadata-action action copied from their semver example.

Here's a copy of the table they provide to explain output tags:

Event Ref Docker Tags
pull_request refs/pull/2/merge pr-2
push refs/heads/master master
push refs/heads/releases/v1 releases-v1
push tag refs/tags/v1.2.3 1.2.3, 1.2, latest
push tag refs/tags/v2.0.8-beta.67 2.0.8-beta.67
tetov commented 1 year ago

(master should be main, right?)

Pushes to refs/head/${branch_name} creates and pushes tag named ${branch_name}.

If we don't want that, we could add a check to the push step to make sure that we only push main and tags.

gonzalocasas commented 1 year ago

It's good as it is! 👍