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.

121 lines
3.7 KiB

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