- Copy .gitlab-ci.yml, tag.py and readme.md into your repository
- Update .gitlab-ci.yml with your registry and repository. Therefore, change:
REGISTRY: [Your Registry]
REPOSITORY: [Your Repository]
to e.g.
REGISTRY: registry.hub.docker.com/library
REPOSITORY: iwanbolzern/finals
- Create gitlab secret for REGISTRY_USER, REGISTRY_PW. It's the username and password of your docker registry! In your Project go to Settings > CI/CD > Variables and create the two variables.
- Create Deploy Key with write access to your repository and add it as SSH_DEPLOY_KEY to variables. First you have to create a public and private key. To do so, open your git-bash and type:
ssh-keygen -o -t rsa -b 4096 -C "[email protected]" -f ssh-key
. Copy the public key to token in Settings > Repository > Deploy Keys and the private key into your variables.