Skip to content

Commit 104f093

Browse files
committed
Add manual deploy trigger with force option
1 parent 08993ec commit 104f093

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/build.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches: [main]
66
schedule:
77
- cron: "0 00,12 * * *" # Twice a day
8+
workflow_dispatch:
9+
inputs:
10+
force:
11+
description: Force rebuild and republish all image tags
12+
required: false
13+
default: false
14+
type: boolean
815

916
env:
1017
IMAGE_NAME: ${{ vars.IMAGE_NAME || 'nikolaik/python-nodejs' }}
@@ -26,7 +33,7 @@ jobs:
2633
- name: Generate build matrix
2734
id: set-matrix
2835
run: |
29-
FORCE=$(if git log --pretty=format:"%s" HEAD^..HEAD | grep -q '\[force\]'; then echo "--force"; else echo ""; fi)
36+
FORCE=$(if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.force }}" == "true" ]]; then echo "--force"; elif git log --pretty=format:"%s" HEAD^..HEAD | grep -q '\[force\]'; then echo "--force"; else echo ""; fi)
3037
uv run dpn $FORCE build-matrix --event ${{ github.event_name }}
3138
3239

0 commit comments

Comments
 (0)