config.yml 1.2 KB

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