-
-
Save sjparkinson/3a9d7627defd3fbad220d67f2f3760f0 to your computer and use it in GitHub Desktop.
Update your .circleci/config.yml files to add Docker Hub authentication.
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
version: 2.1 | |
+ # Docker Hub authentication managed by the shared `dockerhub-shared` context. | |
+ docker-auth: &docker-auth | |
+ auth: | |
+ username: $DOCKERHUB_USERNAME | |
+ password: $DOCKERHUB_ACCESS_TOKEN | |
jobs: | |
test: | |
docker: | |
- image: circleci/whatever | |
+ <<: *docker-auth | |
steps: | |
- checkout | |
- ... | |
deploy: | |
docker: | |
- image: anyorg/whatever | |
+ <<: *docker-auth | |
steps: | |
- checkout | |
- ... | |
workflows: | |
version: 2 | |
workflow: | |
jobs: | |
- test: | |
+ context: dockerhub-shared | |
- deploy: | |
context: | |
+ - dockerhub-shared | |
- some-other-context-if-necessary | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment