Skip to content

Commit 8b21dfe

Browse files
committed
fix(workflow): differentiate error and warning for artifact size increase based on event type
1 parent 279f341 commit 8b21dfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ jobs:
295295
echo "📦 $artifact: $OLD_SIZE → $NEW_SIZE bytes (${INCREASE}% change)"
296296
# Check if increase is more than 5%
297297
if (( $(echo "$INCREASE > 5" | bc -l) )); then
298-
echo "❌ ERROR: $artifact size increased by ${INCREASE}% (limit: 5%)"
299-
FAILED=1
298+
if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
299+
echo "⚠️ WARNING: $artifact size increased by ${INCREASE}% (limit: 5%)"
300+
else
301+
echo "❌ ERROR: $artifact size increased by ${INCREASE}% (limit: 5%)"
302+
FAILED=1
303+
fi
300304
fi
301305
done
302306
if [ $FAILED -eq 1 ]; then

0 commit comments

Comments
 (0)