release-rc.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. tags: |
  22. type=raw,value=${{ steps.package-json.outputs.packageVersion }}
  23. type=raw,value=${{ steps.package-json.outputs.packageVersion }}.{{sha}}
  24. - name: Login to docker.io registry
  25. run: |
  26. echo ${{ secrets. DOCKER_REGISTRY_PASSWORD }} | docker login --username wsmoogle --password-stdin
  27. - name: Login to GitHub Container Registry
  28. uses: docker/login-action@v1
  29. with:
  30. registry: ghcr.io
  31. username: wsmoogle
  32. password: ${{ secrets.DOCKER_REGISTRY_ON_GITHUB_PASSWORD }}
  33. - name: Set up Docker Buildx
  34. uses: docker/setup-buildx-action@v1
  35. - name: Build and push
  36. uses: docker/build-push-action@v2
  37. with:
  38. context: .
  39. file: ./packages/app/docker/Dockerfile
  40. platforms: linux/amd64
  41. push: true
  42. builder: ${{ steps.buildx.outputs.name }}
  43. cache-from: type=gha
  44. cache-to: type=gha,mode=max
  45. tags: ${{ steps.meta.outputs.tags }}