Backport container build changes to the stable-4.1 branch (#26738)

Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
Claire
2023-08-31 19:54:10 +02:00
committed by GitHub
parent ac7d40b561
commit 1ad64b5557
3 changed files with 116 additions and 70 deletions

27
.github/workflows/build-releases.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Build container release images
on:
push:
tags:
- '*'
permissions:
contents: read
packages: write
jobs:
build-image:
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
# Only tag with latest when ran against the latest stable branch
# This needs to be updated after each minor version release
flavor: |
latest=${{ startsWith(github.ref, 'refs/tags/v4.1.') }}
tags: |
type=pep440,pattern={{raw}}
type=pep440,pattern=v{{major}}.{{minor}}
secrets: inherit