From 5bcc932767aa378297e553815190df2f5da342c2 Mon Sep 17 00:00:00 2001 From: Alex Christy Date: Sat, 5 Oct 2024 14:17:26 -0400 Subject: [PATCH] Only create releases when tests pass on main branch --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6340fb..5563a2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,15 @@ name: Create Release on: - push: - branches: - - main - + workflow_run: + workflows: ["Wazuh Decoder & Rule CI Pipeline"] + types: + - completed jobs: release: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && !contains(github.event.workflow_run.head_commit.message, 'ci skip') && !contains(github.event.workflow_run.head_commit.message, 'skip ci') }} # Ensure it runs only on success and if commit message doesn't skip CI steps: - uses: actions/checkout@v4