stream-fusion-better/.github/workflows/docker-release.yml

43 lines
No EOL
1.4 KiB
YAML

name: Build and Push Docker image to GHCR on Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag to build and push as latest (e.g. v2.3.5)"
required: true
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag || github.event.release.tag_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/limehubs/stream-fusion:latest
ghcr.io/limehubs/stream-fusion:${{ github.event.inputs.tag || github.event.release.tag_name }}
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.description=Docker image for Stream Fusion
org.opencontainers.image.title=stream-fusion