1
0

build-nightly.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: Build nightly container image
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: '0 2 * * *' # run at 2 AM UTC
  6. permissions:
  7. contents: read
  8. packages: write
  9. jobs:
  10. compute-suffix:
  11. runs-on: ubuntu-latest
  12. if: github.repository == 'mastodon/mastodon'
  13. steps:
  14. - id: version_vars
  15. env:
  16. TZ: Etc/UTC
  17. run: |
  18. echo mastodon_version_prerelease=nightly.$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
  19. outputs:
  20. prerelease: ${{ steps.version_vars.outputs.mastodon_version_prerelease }}
  21. build-image:
  22. needs: compute-suffix
  23. uses: ./.github/workflows/build-container-image.yml
  24. with:
  25. file_to_build: Dockerfile
  26. platforms: linux/amd64,linux/arm64
  27. use_native_arm64_builder: true
  28. cache: false
  29. push_to_images: |
  30. tootsuite/mastodon
  31. ghcr.io/mastodon/mastodon
  32. version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
  33. labels: |
  34. org.opencontainers.image.description=Nightly build image used for testing purposes
  35. flavor: |
  36. latest=auto
  37. tags: |
  38. type=raw,value=edge
  39. type=raw,value=nightly
  40. type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
  41. secrets: inherit
  42. build-image-streaming:
  43. needs: compute-suffix
  44. uses: ./.github/workflows/build-container-image.yml
  45. with:
  46. file_to_build: streaming/Dockerfile
  47. platforms: linux/amd64,linux/arm64
  48. use_native_arm64_builder: true
  49. cache: false
  50. push_to_images: |
  51. tootsuite/mastodon-streaming
  52. ghcr.io/mastodon/mastodon-streaming
  53. version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
  54. labels: |
  55. org.opencontainers.image.description=Nightly build image used for testing purposes
  56. flavor: |
  57. latest=auto
  58. tags: |
  59. type=raw,value=edge
  60. type=raw,value=nightly
  61. type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
  62. secrets: inherit