Skip to content

Commit a79454b

Browse files
committed
fix(CI-CD): 🐛 Restrict release workflow to main branch only
1 parent e630309 commit a79454b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
}).join('\n');
151151
152152
const header = `
153-
> ${avgStatus.icon} **Overall Coverage: ${avgCoverage}%** ${avgStatus.label === 'perfect' ? '— Target reached! 🎯' : `— Target: ${target}%`}
153+
> ${avgStatus.icon} **Overall Coverage: ${avgCoverage}%** ${avgStatus.label === 'perfect' ? '— Target reached! 🎯' : '— Target: ' + target + '%'}
154154

155155
| | Metric | Progress | Coverage |
156156
|:---:|--------|:--------:|:--------:|

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
echo "::error::Release workflow can only be executed on helpers4/typescript"
4040
exit 1
4141
fi
42+
if [ "${{ github.ref }}" != "refs/heads/main" ]; then
43+
echo "::error::Release workflow can only be executed on main"
44+
exit 1
45+
fi
4246
echo "✅ Repository ownership verified"
4347
4448
# Step 2: Lint

0 commit comments

Comments
 (0)