Created
January 28, 2019 14:23
-
-
Save JayH5/6ff358862ac73c717c3a4ca623f11e7a to your computer and use it in GitHub Desktop.
Example release stage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist: xenial | |
services: | |
- docker | |
language: bash | |
env: | |
global: | |
- IMAGE_TAG=praekeltorg/mysite | |
- REGISTRY_USER=praekeltorg-automation | |
- secret: <REGISTRY_PASS encrypted> | |
before_script: | |
- docker pull "$IMAGE_TAG" || true | |
script: | |
- docker build --pull --cache-from "$IMAGE_TAG" -t "$IMAGE_TAG" . | |
before_deploy: | |
- echo -n "$REGISTRY_PASS" | docker login -u "$REGISTRY_USER" --password-stdin | |
deploy: | |
provider: script | |
script: docker push "$IMAGE_TAG" | |
on: | |
branch: master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment