From b6fd3cd5b6838f449e85dacacf7790a584409a9d Mon Sep 17 00:00:00 2001 From: CURZOLA Pierre Date: Thu, 14 Mar 2024 16:04:16 +0100 Subject: [PATCH] fix(actions): test conditional needs --- .github/workflows/publish.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ac567711..128c107d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -72,7 +72,9 @@ jobs: releases: needs: [linter-master, linter-pull-request, tests] name: GoReleaser Build on All OS but Windows - if: startsWith(github.ref, 'refs/tags/') + # related to https://github.com/actions/runner/issues/2205 + # since a success() is added by default and skipped jobs make success to fail we need this workaround + if: ${{ always() && startsWith(github.ref, 'refs/tags/') && (needs.linter-master.result == 'success' || needs.linter-pull-request.result =='success') }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -94,7 +96,9 @@ jobs: releases-windows: needs: [linter-master, linter-pull-request, tests] name: GoReleaser Build on Windows - if: startsWith(github.ref, 'refs/tags/') + # related to https://github.com/actions/runner/issues/2205 + # since a success() is added by default and skipped jobs make success to fail we need this workaround + if: ${{ always() && startsWith(github.ref, 'refs/tags/') && (needs.linter-master.result == 'success' || needs.linter-pull-request.result =='success') }} runs-on: windows-latest steps: - uses: actions/checkout@v4