build-releases.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Build container release images
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. permissions:
  7. contents: read
  8. packages: write
  9. jobs:
  10. build-image:
  11. uses: ./.github/workflows/build-container-image.yml
  12. with:
  13. file_to_build: Dockerfile
  14. platforms: linux/amd64,linux/arm64
  15. use_native_arm64_builder: true
  16. push_to_images: |
  17. tootsuite/mastodon
  18. ghcr.io/mastodon/mastodon
  19. # Do not use cache when building releases, so apt update is always ran and the release always contain the latest packages
  20. cache: false
  21. # Only tag with latest when ran against the latest stable branch
  22. # This needs to be updated after each minor version release
  23. flavor: |
  24. latest=${{ startsWith(github.ref, 'refs/tags/v4.3.') }}
  25. tags: |
  26. type=pep440,pattern={{raw}}
  27. type=pep440,pattern=v{{major}}.{{minor}}
  28. secrets: inherit
  29. build-image-streaming:
  30. if: startsWith(github.ref, 'refs/tags/v4.3.')
  31. uses: ./.github/workflows/build-container-image.yml
  32. with:
  33. file_to_build: streaming/Dockerfile
  34. platforms: linux/amd64,linux/arm64
  35. use_native_arm64_builder: true
  36. push_to_images: |
  37. tootsuite/mastodon-streaming
  38. ghcr.io/mastodon/mastodon-streaming
  39. # Do not use cache when building releases, so apt update is always ran and the release always contain the latest packages
  40. cache: false
  41. # Only tag with latest when ran against the latest stable branch
  42. # This needs to be updated after each minor version release
  43. flavor: |
  44. latest=${{ startsWith(github.ref, 'refs/tags/v4.3.') }}
  45. tags: |
  46. type=pep440,pattern={{raw}}
  47. type=pep440,pattern=v{{major}}.{{minor}}
  48. secrets: inherit