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.

54 lines
1.3 KiB

  1. name: Test Building Container Images
  2. on:
  3. push:
  4. pull_request:
  5. workflow_dispatch: []
  6. concurrency:
  7. group: ${{ github.head_ref }}/container_test
  8. cancel-in-progress: true
  9. jobs:
  10. build-test:
  11. runs-on: [ubuntu-latest]
  12. strategy:
  13. matrix:
  14. platform: [ linux ]
  15. arch: [ amd64, arm, arm64, 386 ]
  16. steps:
  17. -
  18. name: Checkout
  19. uses: actions/checkout@v2
  20. -
  21. name: Docker meta
  22. id: docker_meta
  23. uses: docker/metadata-action@v3
  24. with:
  25. images: |
  26. chrislusf/seaweedfs
  27. ghcr.io/chrislusf/seaweedfs
  28. tags: |
  29. type=raw,value=latest
  30. labels: |
  31. org.opencontainers.image.title=seaweedfs
  32. org.opencontainers.image.vendor=Chris Lu
  33. -
  34. name: Set up QEMU
  35. uses: docker/setup-qemu-action@v1
  36. -
  37. name: Set up Docker Buildx
  38. uses: docker/setup-buildx-action@v1
  39. with:
  40. buildkitd-flags: "--debug"
  41. -
  42. name: Build
  43. uses: docker/build-push-action@v2
  44. with:
  45. context: ./docker
  46. push: ${{ github.event_name != 'pull_request' }}
  47. file: ./docker/Dockerfile
  48. platforms: ${{ matrix.platform }}/${{ matrix.arch }}
  49. tags: ${{ steps.docker_meta.outputs.tags }}
  50. labels: ${{ steps.docker_meta.outputs.labels }}