2021-11-12 06:18:29 +02:00
|
|
|
name: Build container image
|
|
|
|
on:
|
2021-11-16 22:42:14 +02:00
|
|
|
workflow_dispatch:
|
2021-11-12 06:18:29 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
jobs:
|
|
|
|
build-image:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-05 18:29:54 +02:00
|
|
|
- uses: docker/setup-qemu-action@v1
|
2021-11-12 06:18:29 +02:00
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
|
|
with:
|
2021-12-18 12:57:42 +02:00
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2021-11-12 06:18:29 +02:00
|
|
|
- uses: docker/metadata-action@v3
|
|
|
|
id: meta
|
|
|
|
with:
|
2021-12-18 12:57:42 +02:00
|
|
|
images: ghcr.io/${{ github.repository_owner }}/mastodon
|
2021-11-12 06:18:29 +02:00
|
|
|
flavor: |
|
2021-12-18 12:57:42 +02:00
|
|
|
latest=true
|
2021-11-12 06:18:29 +02:00
|
|
|
tags: |
|
|
|
|
type=edge,branch=main
|
|
|
|
type=semver,pattern={{ raw }}
|
|
|
|
- uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
2022-02-05 18:29:54 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-11-12 06:18:29 +02:00
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
2021-12-18 12:57:42 +02:00
|
|
|
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/mastodon:latest
|
2021-11-12 06:18:29 +02:00
|
|
|
cache-to: type=inline
|