Skip to content

Commit 9d00a22

Browse files
committed
feat(build): add force rebuild logic for main branch
1 parent 8ecda9c commit 9d00a22

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/build_components.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: "Alchemic Circle: Build RetroDECK Components"
33
on:
44
push:
55
branches:
6-
- cooker
6+
- cooker
7+
- main
78
pull_request:
89
types: [opened, synchronize, reopened]
910

@@ -180,6 +181,14 @@ jobs:
180181
181182
reuse=false
182183
184+
# Force rebuild on main branch
185+
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
186+
echo "[INFO] main branch build: forcing rebuild"
187+
reuse=false
188+
echo "reuse=$reuse" >> $GITHUB_OUTPUT
189+
exit 0
190+
fi
191+
183192
# Honor global force-rebuild (env) or workflow input
184193
if [[ "${FORCE_REBUILD:-}" == "true" || "${FORCE_REBUILD_INPUT:-}" == "true" ]]; then
185194
echo "[INFO] Global force rebuild requested (env/input)"
@@ -325,6 +334,14 @@ jobs:
325334
326335
reuse=false
327336
337+
# Force rebuild on main branch
338+
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
339+
echo "[INFO] main branch build: forcing rebuild"
340+
reuse=false
341+
echo "reuse=$reuse" >> $GITHUB_OUTPUT
342+
exit 0
343+
fi
344+
328345
# Honor global force-rebuild (env) or workflow input
329346
if [[ "${FORCE_REBUILD:-}" == "true" || "${FORCE_REBUILD_INPUT:-}" == "true" ]]; then
330347
echo "[INFO] Global force rebuild requested (env/input)"

0 commit comments

Comments
 (0)