Skip to content

Commit becb726

Browse files
committed
add parameter to force rebuild
1 parent 50ed8a1 commit becb726

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/gen-docs.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
# pull_request:
77
# branches: [ "main" ]
88
workflow_dispatch:
9+
inputs:
10+
force:
11+
description: 'Force documentation rebuild even if no source changes'
12+
type: boolean
13+
required: false
14+
default: false
915
schedule:
1016
- cron: '5 2 * * *'
1117

@@ -34,19 +40,21 @@ jobs:
3440

3541
- name: Check for squid source updates
3642
id: check_squid_updates
43+
env:
44+
FORCE_REBUILD: ${{ github.event.inputs.force }}
3745
run: |
3846
LAST_COMMIT_HASH=$(cat last-squid-commit.txt || echo "")
3947
cd squid
4048
CURRENT_COMMIT_HASH=$(git rev-parse HEAD)
4149
echo "current=$CURRENT_COMMIT_HASH" >> $GITHUB_OUTPUT
42-
if [ "$LAST_COMMIT_HASH" = "$CURRENT_COMMIT_HASH" ]; then
50+
if [ "$LAST_COMMIT_HASH" = "$CURRENT_COMMIT_HASH" -a "$FORCE_REBUILD" != "true" ]; then
4351
echo "marking as no no updates"
4452
echo "had_update=false" >> $GITHUB_OUTPUT
4553
else
4654
echo "had_update=true" >> $GITHUB_OUTPUT
4755
fi
4856
echo $CURRENT_COMMIT_HASH > ../last-squid-commit.txt
49-
57+
5058
- name: Install prerequisite Linux packages
5159
if: steps.check_squid_updates.outputs.had_update == 'true'
5260
run: |

0 commit comments

Comments
 (0)