2023-04-19 19:20:25 +02:00
|
|
|
name: Build nightly container image
|
|
|
|
on:
|
2023-04-19 21:46:31 +02:00
|
|
|
workflow_dispatch:
|
2023-04-19 19:20:25 +02:00
|
|
|
schedule:
|
|
|
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
2023-07-18 13:36:12 +02:00
|
|
|
|
2023-04-19 19:20:25 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
jobs:
|
2023-07-18 13:36:12 +02:00
|
|
|
compute-suffix:
|
2023-04-19 19:20:25 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-10-17 22:03:54 +02:00
|
|
|
if: github.repository == 'glitch-soc/mastodon'
|
2023-04-19 19:20:25 +02:00
|
|
|
steps:
|
2023-07-18 13:36:12 +02:00
|
|
|
- id: version_vars
|
2023-07-18 16:56:42 +02:00
|
|
|
env:
|
|
|
|
TZ: Etc/UTC
|
2023-05-04 13:45:39 +02:00
|
|
|
run: |
|
2023-08-25 18:26:44 +02:00
|
|
|
echo mastodon_version_prerelease=nightly.$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
|
2023-07-18 13:36:12 +02:00
|
|
|
outputs:
|
2023-08-25 18:26:44 +02:00
|
|
|
prerelease: ${{ steps.version_vars.outputs.mastodon_version_prerelease }}
|
2023-05-04 13:45:39 +02:00
|
|
|
|
2023-07-18 13:36:12 +02:00
|
|
|
build-image:
|
|
|
|
needs: compute-suffix
|
|
|
|
uses: ./.github/workflows/build-container-image.yml
|
|
|
|
with:
|
2023-11-28 11:04:40 +01:00
|
|
|
file_to_build: Dockerfile
|
2023-07-18 13:36:12 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2023-07-19 07:25:59 +02:00
|
|
|
use_native_arm64_builder: false
|
2023-09-14 23:11:36 +02:00
|
|
|
cache: false
|
2023-07-18 13:36:12 +02:00
|
|
|
push_to_images: |
|
2023-07-19 07:25:59 +02:00
|
|
|
ghcr.io/${{ github.repository_owner }}/mastodon
|
2023-08-25 18:26:44 +02:00
|
|
|
version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
|
2023-07-18 13:36:12 +02:00
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.description=Nightly build image used for testing purposes
|
|
|
|
flavor: |
|
2024-08-24 12:32:48 +02:00
|
|
|
latest=auto
|
2023-07-18 13:36:12 +02:00
|
|
|
tags: |
|
|
|
|
type=raw,value=edge
|
|
|
|
type=raw,value=nightly
|
2023-08-25 18:26:44 +02:00
|
|
|
type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
|
2023-07-18 13:36:12 +02:00
|
|
|
secrets: inherit
|
2023-11-28 11:04:40 +01:00
|
|
|
|
|
|
|
build-image-streaming:
|
|
|
|
needs: compute-suffix
|
|
|
|
uses: ./.github/workflows/build-container-image.yml
|
|
|
|
with:
|
|
|
|
file_to_build: streaming/Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm64
|
2023-12-22 08:45:37 +01:00
|
|
|
use_native_arm64_builder: false
|
2023-11-28 11:04:40 +01:00
|
|
|
cache: false
|
|
|
|
push_to_images: |
|
2023-12-22 13:01:08 +01:00
|
|
|
ghcr.io/${{ github.repository_owner }}/mastodon-streaming
|
2023-11-28 11:04:40 +01:00
|
|
|
version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
|
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.description=Nightly build image used for testing purposes
|
|
|
|
flavor: |
|
2024-08-24 12:32:48 +02:00
|
|
|
latest=auto
|
2023-11-28 11:04:40 +01:00
|
|
|
tags: |
|
|
|
|
type=raw,value=edge
|
|
|
|
type=raw,value=nightly
|
|
|
|
type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
|
|
|
|
secrets: inherit
|