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.

62 lines
1.6 KiB

  1. name: "go: build dev binaries"
  2. on:
  3. push:
  4. branches: [ master ]
  5. jobs:
  6. build-latest-docker-image:
  7. runs-on: [ubuntu-latest]
  8. steps:
  9. -
  10. name: Checkout
  11. uses: actions/checkout@v2
  12. -
  13. name: Docker meta
  14. id: docker_meta
  15. uses: docker/metadata-action@v3
  16. with:
  17. images: |
  18. chrislusf/seaweedfs
  19. ghcr.io/chrislusf/seaweedfs
  20. tags: |
  21. type=raw,value=latest
  22. labels: |
  23. org.opencontainers.image.title=seaweedfs
  24. org.opencontainers.image.vendor=Chris Lu
  25. -
  26. name: Set up QEMU
  27. uses: docker/setup-qemu-action@v1
  28. -
  29. name: Set up Docker Buildx
  30. uses: docker/setup-buildx-action@v1
  31. with:
  32. buildkitd-flags: "--debug"
  33. -
  34. name: Login to Docker Hub
  35. if: github.event_name != 'pull_request'
  36. uses: docker/login-action@v1
  37. with:
  38. username: ${{ secrets.DOCKER_USERNAME }}
  39. password: ${{ secrets.DOCKER_PASSWORD }}
  40. -
  41. name: Login to GHCR
  42. if: github.event_name != 'pull_request'
  43. uses: docker/login-action@v1
  44. with:
  45. registry: ghcr.io
  46. username: ${{ secrets.GHCR_USERNAME }}
  47. password: ${{ secrets.GHCR_TOKEN }}
  48. -
  49. name: Build
  50. uses: docker/build-push-action@v2
  51. with:
  52. context: ./docker
  53. push: ${{ github.event_name != 'pull_request' }}
  54. file: ./docker/Dockerfile
  55. platforms: linux/amd64, linux/arm, linux/arm64
  56. tags: ${{ steps.docker_meta.outputs.tags }}
  57. labels: ${{ steps.docker_meta.outputs.labels }}