ci: automate release publishing

This commit is contained in:
ShukeBta
2026-05-30 13:09:51 +08:00
parent 8f0c6d2324
commit 93c9cb7dfb
5 changed files with 59 additions and 28 deletions
+16 -1
View File
@@ -3,6 +3,17 @@ name: Publish Docker image
on:
push:
tags: ['v*', 'MediaStationGo-v*']
workflow_dispatch:
inputs:
version:
description: 'Image tag to publish, for example MediaStationGo-v0.0.32'
required: true
type: string
ref:
description: 'Git ref to build from'
required: false
default: main
type: string
permissions:
contents: read
@@ -11,8 +22,12 @@ permissions:
jobs:
docker:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
@@ -31,7 +46,7 @@ jobs:
images: ghcr.io/shukebta/mediastation-go
tags: |
type=raw,value=latest
type=ref,event=tag
type=raw,value=${{ env.RELEASE_VERSION }}
- name: Build & push
uses: docker/build-push-action@v6