Skip to content

Commit f9f89fb

Browse files
committed
changed pipeline
1 parent 6d0e010 commit f9f89fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/terraform-module.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
name: Tag release
5959
runs-on: ubuntu-latest
6060
needs: validate
61-
if: github.event_name == 'workflow_dispatch'
61+
# Run on manual dispatch or on push to main
62+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
6263
steps:
6364
- name: Checkout
6465
uses: actions/checkout@v4
@@ -69,7 +70,8 @@ jobs:
6970
uses: anothrNick/[email protected]
7071
env:
7172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
DEFAULT_BUMP: ${{ github.event.inputs.bump }}
73+
# Use input if manual dispatch; otherwise default to patch on push
74+
DEFAULT_BUMP: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.bump || 'patch' }}
7375
TAG_PREFIX: 'v'
7476

7577
- name: Create GitHub Release

0 commit comments

Comments
 (0)