release-rc.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. steps:
  10. - uses: actions/checkout@v3
  11. with:
  12. lfs: true
  13. - name: Retrieve information from package.json
  14. uses: myrotvorets/info-from-package-json-action@1.1.0
  15. id: package-json
  16. - name: Docker meta
  17. id: meta
  18. uses: docker/metadata-action@v3
  19. with:
  20. # images: weseek/growi,ghcr.io/weseek/growi
  21. images: ghcr.io/weseek/growi
  22. tags: |
  23. type=raw,value=${{ steps.package-json.outputs.packageVersion }}
  24. type=raw,value=${{ steps.package-json.outputs.packageVersion }}.{{sha}}
  25. # - name: Login to docker.io registry
  26. # run: |
  27. # echo ${{ secrets. DOCKER_REGISTRY_PASSWORD }} | docker login --username wsmoogle --password-stdin
  28. - name: Login to GitHub Container Registry
  29. uses: docker/login-action@v1
  30. with:
  31. registry: ghcr.io
  32. username: wsmoogle
  33. password: ${{ secrets.DOCKER_REGISTRY_ON_GITHUB_PASSWORD }}
  34. - name: Set up QEMU
  35. uses: docker/setup-qemu-action@v1
  36. - name: Set up Docker Buildx
  37. uses: docker/setup-buildx-action@v2
  38. - name: Build and push
  39. uses: docker/build-push-action@v2
  40. with:
  41. context: .
  42. file: ./packages/app/docker/Dockerfile
  43. platforms: linux/amd64,linux/arm64
  44. push: true
  45. builder: ${{ steps.buildx.outputs.name }}
  46. cache-from: type=gha
  47. cache-to: type=gha,mode=max
  48. tags: ${{ steps.meta.outputs.tags }}