2023-04-19 13:20:25 -04:00
|
|
|
name: Build nightly container image
|
|
|
|
on:
|
2023-04-19 15:46:31 -04:00
|
|
|
workflow_dispatch:
|
2023-04-19 13:20:25 -04:00
|
|
|
schedule:
|
|
|
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
2023-07-18 07:36:12 -04:00
|
|
|
|
2023-04-19 13:20:25 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
jobs:
|
2023-07-18 07:36:12 -04:00
|
|
|
compute-suffix:
|
2023-04-19 13:20:25 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-18 07:36:12 -04:00
|
|
|
- id: version_vars
|
2023-05-04 07:45:39 -04:00
|
|
|
run: |
|
2023-05-05 12:58:35 -04:00
|
|
|
echo mastodon_version_suffix=+nightly-$(date +'%Y%m%d') >> $GITHUB_OUTPUT
|
2023-07-18 07:36:12 -04:00
|
|
|
outputs:
|
|
|
|
suffix: ${{ steps.version_vars.outputs.mastodon_version_suffix }}
|
2023-05-04 07:45:39 -04:00
|
|
|
|
2023-07-18 07:36:12 -04:00
|
|
|
build-image:
|
|
|
|
needs: compute-suffix
|
|
|
|
uses: ./.github/workflows/build-container-image.yml
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
use_native_arm64_builder: true
|
|
|
|
push_to_images: |
|
|
|
|
tootsuite/mastodon
|
|
|
|
ghcr.io/mastodon/mastodon
|
|
|
|
version_suffix: ${{ needs.compute-suffix.outputs.suffix }}
|
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.description=Nightly build image used for testing purposes
|
|
|
|
flavor: |
|
|
|
|
latest=auto
|
|
|
|
tags: |
|
|
|
|
type=raw,value=edge
|
|
|
|
type=raw,value=nightly
|
|
|
|
type=schedule,pattern=nightly-{{date 'YYYY-MM-DD' tz='Etc/UTC'}}
|
|
|
|
secrets: inherit
|