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.5 KiB

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