container_dev.yml 2.2 KB

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