companion-deploy.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: Companion Deploy
  2. on:
  3. push:
  4. branches: [master]
  5. jobs:
  6. docker:
  7. name: DockerHub
  8. runs-on: ubuntu-latest
  9. env:
  10. DOCKER_BUILDKIT: 0
  11. COMPOSE_DOCKER_CLI_BUILD: 0
  12. steps:
  13. - name: Checkout sources
  14. uses: actions/checkout@v2
  15. - name: Docker meta
  16. id: docker_meta
  17. uses: crazy-max/ghaction-docker-meta@v1
  18. with:
  19. images: transloadit/companion
  20. tag-sha: true
  21. tag-match: |
  22. \d{1,3}.\d{1,3}.\d{1,3}
  23. - uses: docker/setup-buildx-action@v1
  24. - name: Log in to DockerHub
  25. uses: docker/login-action@v1
  26. with:
  27. username: ${{secrets.DOCKER_USERNAME}}
  28. password: ${{secrets.DOCKER_PASSWORD}}
  29. - name: Build and push
  30. uses: docker/build-push-action@v2
  31. with:
  32. push: true
  33. context: packages/@uppy/companion
  34. file: packages/@uppy/companion/Dockerfile
  35. tags: ${{ steps.docker_meta.outputs.tags }}
  36. labels: ${{ steps.docker_meta.outputs.labels }}
  37. heroku:
  38. name: Heroku
  39. runs-on: ubuntu-latest
  40. steps:
  41. - name: Checkout sources
  42. uses: actions/checkout@v2
  43. - name: Deploy to heroku
  44. uses: akhileshns/heroku-deploy@v3.12.12
  45. with:
  46. appdir: packages/@uppy/companion
  47. heroku_api_key: ${{secrets.HEROKU_API_KEY}}
  48. heroku_app_name: companion-demo
  49. heroku_email: ${{secrets.HEROKU_EMAIL}}