release-rc.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: Release Docker Images for RC
  2. on:
  3. push:
  4. branches:
  5. - rc/**
  6. jobs:
  7. build-rc:
  8. runs-on: ubuntu-latest
  9. strategy:
  10. matrix:
  11. platform: [linux/amd64, linux/arm64]
  12. steps:
  13. - uses: actions/checkout@v3
  14. with:
  15. lfs: true
  16. - name: Retrieve information from package.json
  17. uses: myrotvorets/info-from-package-json-action@1.2.0
  18. id: package-json
  19. - name: Docker meta
  20. id: meta
  21. uses: docker/metadata-action@v4
  22. with:
  23. images: weseek/growi,ghcr.io/weseek/growi
  24. tags: |
  25. type=raw,value=${{ steps.package-json.outputs.packageVersion }}
  26. type=raw,value=${{ steps.package-json.outputs.packageVersion }}.{{sha}}
  27. - name: Login to docker.io registry
  28. run: |
  29. echo ${{ secrets. DOCKER_REGISTRY_PASSWORD }} | docker login --username wsmoogle --password-stdin
  30. - name: Login to GitHub Container Registry
  31. uses: docker/login-action@v2
  32. with:
  33. registry: ghcr.io
  34. username: wsmoogle
  35. password: ${{ secrets.DOCKER_REGISTRY_ON_GITHUB_PASSWORD }}
  36. - name: Set up QEMU
  37. if: ${{ matrix.platform == 'linux/arm64' }}
  38. uses: docker/setup-qemu-action@v1
  39. - name: Set up Docker Buildx
  40. uses: docker/setup-buildx-action@v2
  41. - name: Build and push
  42. uses: docker/build-push-action@v2
  43. with:
  44. context: .
  45. file: ./packages/app/docker/Dockerfile
  46. platforms: ${{ matrix.platform }}
  47. push: true
  48. builder: ${{ steps.buildx.outputs.name }}
  49. cache-from: type=gha
  50. cache-to: type=gha,mode=max
  51. tags: ${{ steps.meta.outputs.tags }}