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.

129 lines
3.9 KiB

  1. name: Build Release Containers
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. workflow_dispatch: []
  7. jobs:
  8. build-default:
  9. runs-on: [ubuntu-latest]
  10. strategy:
  11. matrix:
  12. platform: [ linux ]
  13. arch: [ amd64, arm, arm64, 386 ]
  14. steps:
  15. -
  16. name: Checkout
  17. uses: actions/checkout@v2
  18. -
  19. name: Docker meta
  20. id: docker_meta
  21. uses: docker/metadata-action@v3
  22. with:
  23. images: |
  24. chrislusf/seaweedfs
  25. ghcr.io/chrislusf/seaweedfs
  26. tags: |
  27. type=ref,event=tag
  28. flavor: |
  29. latest=false
  30. labels: |
  31. org.opencontainers.image.title=seaweedfs
  32. org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
  33. org.opencontainers.image.vendor=Chris Lu
  34. -
  35. name: Set up QEMU
  36. uses: docker/setup-qemu-action@v1
  37. -
  38. name: Set up Docker Buildx
  39. uses: docker/setup-buildx-action@v1
  40. with:
  41. buildkitd-flags: "--debug"
  42. -
  43. name: Login to Docker Hub
  44. if: github.event_name != 'pull_request'
  45. uses: docker/login-action@v1
  46. with:
  47. username: ${{ secrets.DOCKER_USERNAME }}
  48. password: ${{ secrets.DOCKER_PASSWORD }}
  49. -
  50. name: Login to GHCR
  51. if: github.event_name != 'pull_request'
  52. uses: docker/login-action@v1
  53. with:
  54. registry: ghcr.io
  55. username: ${{ secrets.GHCR_USERNAME }}
  56. password: ${{ secrets.GHCR_TOKEN }}
  57. -
  58. name: Build
  59. uses: docker/build-push-action@v2
  60. with:
  61. context: ./docker
  62. push: ${{ github.event_name != 'pull_request' }}
  63. file: ./docker/Dockerfile.go_build
  64. platforms: ${{ matrix.platform }}/${{ matrix.arch }}
  65. tags: ${{ steps.docker_meta.outputs.tags }}
  66. labels: ${{ steps.docker_meta.outputs.labels }}
  67. build-large:
  68. runs-on: [ubuntu-latest]
  69. strategy:
  70. matrix:
  71. platform: [ linux ]
  72. arch: [ amd64, arm, arm64, 386 ]
  73. steps:
  74. -
  75. name: Checkout
  76. uses: actions/checkout@v2
  77. -
  78. name: Docker meta
  79. id: docker_meta
  80. uses: docker/metadata-action@v3
  81. with:
  82. images: |
  83. chrislusf/seaweedfs
  84. ghcr.io/chrislusf/seaweedfs
  85. tags: |
  86. type=ref,event=tag,suffix=_large_disk
  87. flavor: |
  88. latest=false
  89. labels: |
  90. org.opencontainers.image.title=seaweedfs
  91. org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
  92. org.opencontainers.image.vendor=Chris Lu
  93. -
  94. name: Set up QEMU
  95. uses: docker/setup-qemu-action@v1
  96. -
  97. name: Set up Docker Buildx
  98. uses: docker/setup-buildx-action@v1
  99. with:
  100. buildkitd-flags: "--debug"
  101. -
  102. name: Login to Docker Hub
  103. if: github.event_name != 'pull_request'
  104. uses: docker/login-action@v1
  105. with:
  106. username: ${{ secrets.DOCKER_USERNAME }}
  107. password: ${{ secrets.DOCKER_PASSWORD }}
  108. -
  109. name: Login to GHCR
  110. if: github.event_name != 'pull_request'
  111. uses: docker/login-action@v1
  112. with:
  113. registry: ghcr.io
  114. username: ${{ secrets.GHCR_USERNAME }}
  115. password: ${{ secrets.GHCR_TOKEN }}
  116. -
  117. name: Build
  118. uses: docker/build-push-action@v2
  119. with:
  120. context: ./docker
  121. push: ${{ github.event_name != 'pull_request' }}
  122. file: ./docker/Dockerfile.go_build_large
  123. platforms: ${{ matrix.platform }}/${{ matrix.arch }}
  124. tags: ${{ steps.docker_meta.outputs.tags }}
  125. labels: ${{ steps.docker_meta.outputs.labels }}