ci: add main/master branch trigger to docker-build workflow
Docker Build / Build and Push Docker Image (push) Failing after 4m42s

This commit is contained in:
2026-06-11 23:45:52 +08:00
parent 052da457eb
commit 2780f71b8f
+7 -6
View File
@@ -2,14 +2,12 @@ name: Docker Build
on:
push:
branches:
- main
- master
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag name to build (e.g., v0.10.8)'
required: true
type: string
jobs:
build-and-push:
@@ -44,8 +42,11 @@ jobs:
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
TAG="${{ github.event.inputs.tag }}"
else
elif echo "${{ github.ref }}" | grep -q "^refs/tags/"; then
TAG=${GITHUB_REF#refs/tags/}
else
SHORT_SHA=$(git rev-parse --short HEAD)
TAG="dev-${SHORT_SHA}"
fi
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "${TAG}" > VERSION