Skip to content

Commit 73ee143

Browse files
author
github-copilot
committed
chore: make CI build/push and deploy run only on main pushes
1 parent 3591952 commit 73ee143

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/ci-build-deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
run: python -m pytest -q samples/book-app-project/tests
2222

2323
build-and-push:
24+
if: github.event_name == 'push'
2425
needs: test
2526
runs-on: ubuntu-latest
2627
permissions:
@@ -50,7 +51,7 @@ jobs:
5051
deploy:
5152
needs: build-and-push
5253
runs-on: ubuntu-latest
53-
if: ${{ secrets.KUBE_CONFIG != '' }}
54+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main') && secrets.KUBE_CONFIG != '' }}
5455
steps:
5556
- uses: actions/checkout@v4
5657
- name: Install kubectl

0 commit comments

Comments
 (0)