container_latest.yml 3.4 KB

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