You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

  1. name: ci
  2. on:
  3. schedule:
  4. - cron: '0 10 * * *' # everyday at 10am
  5. push:
  6. branches:
  7. - master
  8. - fix/herokuDeploy
  9. tags:
  10. - 'v*.*.*'
  11. jobs:
  12. docker:
  13. runs-on: ubuntu-latest
  14. steps:
  15. -
  16. name: Checkout
  17. uses: actions/checkout@v2
  18. -
  19. name: Docker meta
  20. id: docker_meta
  21. uses: crazy-max/ghaction-docker-meta@v1
  22. with:
  23. images: doccano/doccano
  24. tag-sha: true
  25. tag-semver: |
  26. {{version}}
  27. {{major}}.{{minor}}
  28. -
  29. name: Set up QEMU
  30. uses: docker/setup-qemu-action@v1
  31. -
  32. name: Set up Docker Buildx
  33. uses: docker/setup-buildx-action@v1
  34. -
  35. name: Login to DockerHub
  36. if: github.event_name != 'pull_request'
  37. uses: docker/login-action@v1
  38. with:
  39. username: ${{ secrets.DOCKERHUB_USERNAME }}
  40. password: ${{ secrets.DOCKERHUB_TOKEN }}
  41. -
  42. name: Build and push
  43. id: docker_build
  44. uses: docker/build-push-action@v2
  45. with:
  46. context: .
  47. file: ./docker/Dockerfile
  48. push: ${{ github.event_name != 'pull_request' }}
  49. tags: ${{ steps.docker_meta.outputs.tags }}
  50. labels: ${{ steps.docker_meta.outputs.labels }}