Skip to content

Instantly share code, notes, and snippets.

@dnaprawa
Created April 15, 2020 09:16
Show Gist options
  • Save dnaprawa/d7ad0ea451e5d3d697aa002b0c6e9075 to your computer and use it in GitHub Desktop.
Save dnaprawa/d7ad0ea451e5d3d697aa002b0c6e9075 to your computer and use it in GitHub Desktop.
image: docker:19.03.8
before_script:
- docker info
- docker login -u $REGISTRY_USER -p $REGISTRY_PASS $REGISTRY_URL
build:
stage: build
script:
- docker pull $REGISTRY_IMAGE:latest || true
- docker build --cache-from $REGISTRY_IMAGE:latest --tag $REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $REGISTRY_IMAGE:latest .
- docker push $REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $REGISTRY_IMAGE:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment