暫無描述

dockerbuild.yaml 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: dockerbuild
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches:
  6. - main
  7. paths:
  8. - "**"
  9. - "!.github/**"
  10. - "!**.md"
  11. - "!docker-compose.yml"
  12. jobs:
  13. main:
  14. runs-on: ubuntu-latest
  15. continue-on-error: ${{ matrix.experimental }}
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. include:
  20. - app: frontend
  21. path: frontend
  22. version: 2.2.0
  23. experimental: true
  24. - app: backend
  25. path: backend
  26. version: 2.2.0
  27. experimental: true
  28. - app: orborus
  29. path: functions/onprem/orborus
  30. version: 2.2.0
  31. experimental: true
  32. - app: worker
  33. path: functions/onprem/worker
  34. version: 2.2.0
  35. experimental: true
  36. steps:
  37. - name: Checkout
  38. uses: actions/checkout@v3
  39. - name: Set up Docker Buildx
  40. uses: docker/setup-buildx-action@v3
  41. - name: Set up QEMU
  42. uses: docker/setup-qemu-action@v3
  43. with:
  44. platforms: "amd64,arm64,arm"
  45. - name: Login to DockerHub
  46. uses: docker/login-action@v3
  47. with:
  48. username: ${{ secrets.DOCKERHUB_USERNAME }}
  49. password: ${{ secrets.DOCKERHUB_TOKEN }}
  50. - name: Login to Ghcr
  51. uses: docker/login-action@v3
  52. with:
  53. registry: ghcr.io
  54. username: ${{ github.actor }}
  55. password: ${{ secrets.GITHUB_TOKEN }}
  56. - name: Ghcr Build and push
  57. id: docker_build
  58. uses: docker/build-push-action@v4
  59. env:
  60. BUILDX_NO_DEFAULT_LOAD: true
  61. with:
  62. logout: false
  63. context: ${{ matrix.path }}/
  64. file: ${{ matrix.path }}/Dockerfile
  65. platforms: linux/amd64,linux/arm64
  66. push: true
  67. cache-from: type=local,src=/tmp/.buildx-cache
  68. cache-to: type=local,dest=/tmp/.buildx-cache
  69. tags: |
  70. ghcr.io/shuffle/shuffle-${{ matrix.app }}:${{ matrix.version }}
  71. ghcr.io/shuffle/shuffle-${{ matrix.app }}:latest
  72. ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-${{ matrix.app }}:${{ matrix.version }}
  73. frikky/shuffle-${{ matrix.app }}:${{ matrix.version }}
  74. frikky/shuffle:${{ matrix.app }}
  75. - name: Image digest
  76. run: echo ${{ steps.docker_build.outputs.digest }}