Add semver support when using git tags (#69)

* Add semver tag support

* Allow tag_names to be a fallback for tag_semver
This commit is contained in:
Roy Bongers
2020-03-03 19:48:59 +01:00
committed by GitHub
parent a11682167c
commit b82ad077c0
4 changed files with 80 additions and 0 deletions

View File

@@ -187,3 +187,16 @@ with:
password: ${{ secrets.DOCKER_PASSWORD }}
tag_names: true
```
### tag_semver
Use `tag_semver` when you want to push tags using the semver syntax by their git name (e.g. `refs/tags/v1.2.3`). This will push four
docker tags: `1.2.3`, `1.2` and `1`. A prefix 'v' will automatically be removed.
> CAUTION: Images produced by this feature can be override by branches with the same name - without a way to restore.
```yaml
with:
name: myDocker/repository
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tag_semver: true
```