Skip to content

Commit e9abaa4

Browse files
committed
Modify CD to be triggered only on main
1 parent da61f7b commit e9abaa4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch: {}
78

89
env:
910
VERSION: v1.${{ github.run_number }}
1011

1112
jobs:
1213
release-main:
14+
if: github.ref == 'refs/heads/main'
1315
runs-on: ubuntu-latest
16+
1417
steps:
1518
- uses: actions/checkout@v4
1619

@@ -34,7 +37,3 @@ jobs:
3437
docker push myregistry/nifipulse:${{ env.VERSION }}
3538
docker tag nifipulse-prod myregistry/nifipulse:latest
3639
docker push myregistry/nifipulse:latest
37-
38-
# Optional: Deploy to server/k8s here
39-
# - name: Deploy
40-
# run: ./deploy.sh

0 commit comments

Comments
 (0)