From 03c1b2865166d66b23f4c126d89afcf7e85c76ef Mon Sep 17 00:00:00 2001 From: Paco Aranda Date: Wed, 19 Jun 2024 15:36:34 +0200 Subject: [PATCH] [BUGFIX] ci: Define conditions to publish the release properly (#5061) Otherwise, the release job will be executed each time. --- .github/workflows/argilla-v1.yml | 2 +- .github/workflows/argilla.yml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/argilla-v1.yml b/.github/workflows/argilla-v1.yml index f2b3e7dd76..62df3dba5e 100644 --- a/.github/workflows/argilla-v1.yml +++ b/.github/workflows/argilla-v1.yml @@ -101,7 +101,7 @@ jobs: publish_release: name: Publish Release runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' || ${{ github.event_name }} == 'workflow_dispatch' + if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }} permissions: # This permission is needed for private repositories. diff --git a/.github/workflows/argilla.yml b/.github/workflows/argilla.yml index 4a7e98f4f4..c129584e9c 100644 --- a/.github/workflows/argilla.yml +++ b/.github/workflows/argilla.yml @@ -81,9 +81,7 @@ jobs: publish_release: name: Publish Release runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' || ${{ github.event_name }} == 'workflow_dispatch' - needs: - - build + if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }} permissions: # This permission is needed for private repositories. @@ -93,6 +91,9 @@ jobs: # This permission is needed for creating tags contents: write + needs: + - build + defaults: run: shell: bash -l {0}