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.

64 lines
1.9 KiB

3 years ago
3 years ago
  1. name: "docker: build latest container"
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. workflow_dispatch: []
  7. jobs:
  8. build-latest-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=raw,value=latest
  24. labels: |
  25. org.opencontainers.image.title=seaweedfs
  26. 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!
  27. org.opencontainers.image.vendor=Chris Lu
  28. -
  29. name: Set up QEMU
  30. uses: docker/setup-qemu-action@v1
  31. -
  32. name: Set up Docker Buildx
  33. uses: docker/setup-buildx-action@v1
  34. with:
  35. buildkitd-flags: "--debug"
  36. -
  37. name: Login to Docker Hub
  38. if: github.event_name != 'pull_request'
  39. uses: docker/login-action@v1
  40. with:
  41. username: ${{ secrets.DOCKER_USERNAME }}
  42. password: ${{ secrets.DOCKER_PASSWORD }}
  43. -
  44. name: Login to GHCR
  45. if: github.event_name != 'pull_request'
  46. uses: docker/login-action@v1
  47. with:
  48. registry: ghcr.io
  49. username: ${{ secrets.GHCR_USERNAME }}
  50. password: ${{ secrets.GHCR_TOKEN }}
  51. -
  52. name: Build
  53. uses: docker/build-push-action@v2
  54. with:
  55. context: ./docker
  56. push: ${{ github.event_name != 'pull_request' }}
  57. file: ./docker/Dockerfile.go_build
  58. platforms: linux/amd64, linux/arm, linux/arm64, linux/386
  59. tags: ${{ steps.docker_meta.outputs.tags }}
  60. labels: ${{ steps.docker_meta.outputs.labels }}