2023-04-20 02:20:25 +09:00
|
|
|
name: Build nightly container image
|
|
|
|
on:
|
2023-04-20 04:46:31 +09:00
|
|
|
workflow_dispatch:
|
2023-04-20 02:20:25 +09:00
|
|
|
schedule:
|
|
|
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
2023-07-18 20:36:12 +09:00
|
|
|
|
2023-04-20 02:20:25 +09:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
jobs:
|
2023-07-18 20:36:12 +09:00
|
|
|
compute-suffix:
|
2023-04-20 02:20:25 +09:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-18 20:36:12 +09:00
|
|
|
- id: version_vars
|
2023-07-18 23:56:42 +09:00
|
|
|
env:
|
|
|
|
TZ: Etc/UTC
|
2023-05-04 20:45:39 +09:00
|
|
|
run: |
|
2023-08-24 21:43:44 +09:00
|
|
|
echo mastodon_version_suffix=nightly.$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
|
2023-07-18 20:36:12 +09:00
|
|
|
outputs:
|
|
|
|
suffix: ${{ steps.version_vars.outputs.mastodon_version_suffix }}
|
2023-05-04 20:45:39 +09:00
|
|
|
|
2023-07-18 20:36:12 +09:00
|
|
|
build-image:
|
|
|
|
needs: compute-suffix
|
|
|
|
uses: ./.github/workflows/build-container-image.yml
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
2023-07-19 14:25:59 +09:00
|
|
|
use_native_arm64_builder: false
|
2023-07-18 20:36:12 +09:00
|
|
|
push_to_images: |
|
2023-07-19 14:25:59 +09:00
|
|
|
ghcr.io/${{ github.repository_owner }}/mastodon
|
2023-08-24 21:43:44 +09:00
|
|
|
# The `-` is important here, result will be v4.1.2-nightly.2022-03-05
|
|
|
|
version_suffix: -${{ needs.compute-suffix.outputs.suffix }}
|
2023-07-18 20:36:12 +09:00
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.description=Nightly build image used for testing purposes
|
|
|
|
flavor: |
|
|
|
|
latest=auto
|
|
|
|
tags: |
|
|
|
|
type=raw,value=edge
|
|
|
|
type=raw,value=nightly
|
2023-07-18 23:56:42 +09:00
|
|
|
type=schedule,pattern=${{ needs.compute-suffix.outputs.suffix }}
|
2023-07-18 20:36:12 +09:00
|
|
|
secrets: inherit
|