docker-ci.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: docker-ci
  2. on:
  3. pull_request:
  4. jobs:
  5. docker-ci:
  6. runs-on: ubuntu-22.04
  7. timeout-minutes: 20
  8. steps:
  9. - name: Checkout Code
  10. uses: actions/checkout@v3
  11. # # only needed for arm64 builds
  12. # - name: Set up QEMU
  13. # uses: docker/setup-qemu-action@v2
  14. - name: Set up Docker Buildx
  15. uses: docker/setup-buildx-action@v2
  16. - name: Docker metadata action
  17. id: meta
  18. uses: docker/metadata-action@v4
  19. with:
  20. images:
  21. zammad-local
  22. tags: |
  23. type=raw,latest
  24. - name: Build Docker image
  25. id: docker_build
  26. uses: docker/build-push-action@v3
  27. with:
  28. context: .
  29. labels: ${{ steps.meta.outputs.labels }}
  30. # arm64 build takes up to 4 hours
  31. platforms: linux/amd64 #,linux/arm64
  32. push: false
  33. tags: ${{ steps.meta.outputs.tags }}
  34. outputs: type=docker,dest=/tmp/zammad-local.tar
  35. - name: Checkout docker-compose files
  36. uses: actions/checkout@v3
  37. with:
  38. repository: zammad/zammad-docker-compose
  39. path: zammad-docker-compose
  40. - name: Run docker-compose tests
  41. run: |
  42. cd zammad-docker-compose
  43. docker load --input /tmp/zammad-local.tar
  44. docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.override-local.yml up --detach
  45. docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad
  46. .github/tests.sh