build-nightly.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. steps:
  13. - id: version_vars
  14. env:
  15. TZ: Etc/UTC
  16. run: |
  17. echo mastodon_version_prerelease=nightly.$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
  18. outputs:
  19. prerelease: ${{ steps.version_vars.outputs.mastodon_version_prerelease }}
  20. build-image:
  21. needs: compute-suffix
  22. uses: ./.github/workflows/build-container-image.yml
  23. with:
  24. platforms: linux/amd64,linux/arm64
  25. use_native_arm64_builder: true
  26. cache: false
  27. push_to_images: |
  28. tootsuite/mastodon
  29. ghcr.io/mastodon/mastodon
  30. version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
  31. labels: |
  32. org.opencontainers.image.description=Nightly build image used for testing purposes
  33. flavor: |
  34. latest=auto
  35. tags: |
  36. type=raw,value=edge
  37. type=raw,value=nightly
  38. type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
  39. secrets: inherit