ci: add main/master branch trigger to docker-build workflow
Docker Build / Build and Push Docker Image (push) Failing after 4m42s
Docker Build / Build and Push Docker Image (push) Failing after 4m42s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user