Skip to content

Commit

Permalink
require tests and linux-build to succeed on release run
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Jul 15, 2024
1 parent 0a6e0d1 commit 2cac6cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,17 @@ jobs:
publish:
name: Publish Binaries
# - !cancelled() allows evaluating further conditional expressions even if
# needed jobs were skipped
# - !cancelled() allows evaluating further conditional expressions even if needed jobs were skipped; this unblocks
# the job allowing it to run even if needed jobs failed, unless explicitly required in the "if" expression
if: ${{
!cancelled()
&& (needs.mac-os-build.result == 'success' || needs.mac-os-build.result == 'skipped')
&& (needs.windows-build.result == 'success' || needs.windows-build.result == 'skipped')
&& (needs.fablab-smoketest.result == 'success' || needs.fablab-smoketest.result == 'skipped')
&& (needs.tests.result == 'success')
}}
runs-on: ubuntu-20.04
# ensure required job outcomes are specified in "if" expression
needs: [ tests, linux-build, mac-os-build, windows-build, fablab-smoketest, fablab-ha-smoketest ]
outputs:
ZITI_VERSION: ${{ steps.get_version.outputs.ZITI_VERSION }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,16 @@ jobs:
publish:
name: Publish Binaries
# !cancelled() overrides default behavior, allowing this job to proceed if needed jobs failed, unless "if"
# expression specifies a required outcome
if: ${{
!cancelled()
&& (needs.mac-os-build.result == 'success' || needs.mac-os-build.result == 'skipped')
&& (needs.windows-build.result == 'success' || needs.windows-build.result == 'skipped')
&& (needs.linux-build.result == 'success')
&& (needs.tests.result == 'success')
}}
# ensure required job outcomes are specified in "if" expression
needs: [ tests, linux-build, mac-os-build, windows-build ]
runs-on: ubuntu-20.04
outputs:
Expand Down

0 comments on commit 2cac6cd

Please sign in to comment.