Skip to content

Commit 465d588

Browse files
committed
fix: workflow only runs when version labels are applied
- Remove version-check job since it can't be required if it only runs on labels - Workflow now only triggers on 'labeled' events with version:patch|minor|major - This is the correct approach: workflow only runs when labels are applied - No required checks since the workflow is optional/manual via labels
1 parent 6a1d6a5 commit 465d588

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

.github/workflows/version-bump.yaml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Version Bump
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, labeled]
5+
types: [labeled]
66
paths:
77
- 'registry/**/modules/**'
88

@@ -11,38 +11,6 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
version-check:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0
21-
22-
- name: Check if version bump is needed
23-
run: |
24-
echo "🔍 Checking if module versions need to be updated..."
25-
26-
# Run the script with patch to see if it would make changes
27-
if ./.github/scripts/version-bump.sh patch origin/main; then
28-
# Check if the script made any changes
29-
if git diff --quiet; then
30-
echo "✅ Module versions are up to date"
31-
else
32-
echo "❌ Module versions need to be updated!"
33-
echo "The script would make the following changes:"
34-
git diff --name-only
35-
echo ""
36-
echo "To fix this, add a version label to your PR:"
37-
echo "- version:patch (for bug fixes)"
38-
echo "- version:minor (for new features)"
39-
echo "- version:major (for breaking changes)"
40-
exit 1
41-
fi
42-
else
43-
echo "ℹ️ No modules detected in changes"
44-
fi
45-
4614
version-bump:
4715
if: github.event.label.name == 'version:patch' || github.event.label.name == 'version:minor' || github.event.label.name == 'version:major'
4816
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)