From 0ca1f1dcbfd5d639b1d5d1765f7cab48864470b2 Mon Sep 17 00:00:00 2001 From: omsh Date: Sun, 7 Jul 2024 20:58:20 +0200 Subject: [PATCH] trigger pypi workflow only on main and build succeeds on main --- .github/workflows/pypi.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 0291a54d..b298c196 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -12,7 +12,10 @@ on: jobs: release: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main'}} + if: | + github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.head_branch == 'main' && + github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 - name: Set up Python