1
0

config.yml 988 B

12345678910111213141516171819202122232425262728293031
  1. version: 2
  2. jobs:
  3. dockerhubuploadrelease:
  4. machine: true
  5. steps:
  6. - checkout
  7. - run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} .
  8. - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
  9. - run: docker push matrixdotorg/synapse:${CIRCLE_TAG}
  10. dockerhubuploadlatest:
  11. machine: true
  12. steps:
  13. - checkout
  14. - run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest .
  15. - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
  16. - run: docker push matrixdotorg/synapse:latest
  17. workflows:
  18. version: 2
  19. build:
  20. jobs:
  21. - dockerhubuploadrelease:
  22. filters:
  23. tags:
  24. only: /v[0-9].[0-9]+.[0-9]+.*/
  25. branches:
  26. ignore: /.*/
  27. - dockerhubuploadlatest:
  28. filters:
  29. branches:
  30. only: master