build-nightly.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. push_to_images: |
  27. tootsuite/mastodon
  28. ghcr.io/mastodon/mastodon
  29. version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
  30. labels: |
  31. org.opencontainers.image.description=Nightly build image used for testing purposes
  32. flavor: |
  33. latest=auto
  34. tags: |
  35. type=raw,value=edge
  36. type=raw,value=nightly
  37. type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
  38. secrets: inherit