2023-02-17 20:22:56 +01:00
|
|
|
name: Publish Release
|
2023-02-10 22:47:58 +01:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tags:
|
2023-10-19 20:19:59 +02:00
|
|
|
description: "version"
|
2023-02-10 22:47:58 +01:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
|
|
|
|
jobs:
|
2023-06-21 23:29:41 +02:00
|
|
|
build_docker_release:
|
2023-02-10 22:47:58 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-10-19 20:23:03 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-02-10 22:47:58 +01:00
|
|
|
with:
|
2023-10-19 20:19:59 +02:00
|
|
|
ref: "main"
|
2023-02-10 22:47:58 +01:00
|
|
|
fetch-depth: 0
|
|
|
|
|
2023-10-19 20:19:59 +02:00
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
|
|
|
|
tags: |
|
|
|
|
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
|
|
|
type=sha
|
|
|
|
type=raw,value=${{ inputs.tags }}
|
|
|
|
|
2023-02-10 22:47:58 +01:00
|
|
|
- name: Set up QEMU
|
2023-06-21 23:29:41 +02:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2023-02-10 22:47:58 +01:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-10-19 20:23:08 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-02-10 22:47:58 +01:00
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
2023-10-19 20:19:59 +02:00
|
|
|
username: ${{ github.repository_owner }}
|
2023-02-10 22:47:58 +01:00
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2023-10-19 20:19:59 +02:00
|
|
|
|
2023-06-21 23:29:41 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GH_TOKEN }}
|
2023-02-10 22:47:58 +01:00
|
|
|
|
2023-06-21 23:29:41 +02:00
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v4
|
2023-02-10 22:47:58 +01:00
|
|
|
with:
|
|
|
|
context: ./
|
|
|
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2023-10-19 20:19:59 +02:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|