trigger a gitlab pipeline when apply a tag
publish:
stage: publish
image: docker
services:
- docker:dind
# Only publish when a release tag (vX.X.X) is pushed
only:
- /v[0-9|\.]+/ # release tags
- /release-v[0-9|\.]+/ # pre-release branches
except:
- branches
script:
- apk add --update ca-certificates make nodejs nodejs-npm
- npm install
- docker login -u gitlab-ci-token --password $CI_BUILD_TOKEN registry.gitlab.com
- make docker-image publish-docker-image