2021-11-11 20:18:29 -08:00
|
|
|
name: Build container image
|
|
|
|
on:
|
2021-11-16 12:42:14 -08:00
|
|
|
workflow_dispatch:
|
2021-11-11 20:18:29 -08:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
jobs:
|
|
|
|
build-image:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
|
|
with:
|
2021-11-13 21:11:05 -08:00
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2021-11-11 20:18:29 -08:00
|
|
|
- uses: docker/metadata-action@v3
|
|
|
|
id: meta
|
|
|
|
with:
|
2021-11-13 21:11:05 -08:00
|
|
|
images: tootsuite/mastodon
|
2021-11-11 20:18:29 -08:00
|
|
|
flavor: |
|
2021-11-13 21:11:05 -08:00
|
|
|
latest=auto
|
2021-11-11 20:18:29 -08:00
|
|
|
tags: |
|
|
|
|
type=edge,branch=main
|
|
|
|
type=semver,pattern={{ raw }}
|
|
|
|
- uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
2021-11-13 21:11:05 -08:00
|
|
|
cache-from: type=registry,ref=tootsuite/mastodon:latest
|
2021-11-11 20:18:29 -08:00
|
|
|
cache-to: type=inline
|