mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 03:36:37 +08:00
ci: automate release publishing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user