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.

63 lines
1.9 KiB

3 years ago
3 years ago
  1. name: "docker: build latest container"
  2. on:
  3. push:
  4. branches: [ master ]
  5. workflow_dispatch: []
  6. jobs:
  7. build-latest-container:
  8. runs-on: [ubuntu-latest]
  9. steps:
  10. -
  11. name: Checkout
  12. uses: actions/checkout@v2
  13. -
  14. name: Docker meta
  15. id: docker_meta
  16. uses: docker/metadata-action@v3
  17. with:
  18. images: |
  19. chrislusf/seaweedfs
  20. ghcr.io/chrislusf/seaweedfs
  21. tags: |
  22. type=raw,value=dev
  23. labels: |
  24. org.opencontainers.image.title=seaweedfs
  25. 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!
  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.go_build
  57. platforms: linux/amd64, linux/arm, linux/arm64, linux/386
  58. tags: ${{ steps.docker_meta.outputs.tags }}
  59. labels: ${{ steps.docker_meta.outputs.labels }}