Skip to content

Commit

Permalink
Merge pull request #375 from cbgbt/fix-yaml-error
Browse files Browse the repository at this point in the history
ci: merge erroneous if statements in release workflow
  • Loading branch information
cbgbt authored Sep 16, 2024
2 parents 1aa2f5c + 236309a commit 15251cb
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ jobs:
# Build and packages all the things
upload-artifacts:
if: github.repository == 'bottlerocket-os/twoliter'
# Let the initial task tell us to not run (currently very blunt)
needs: create-release
if: ${{ needs.create-release.outputs.has-releases == 'true' }}
if: >-
${{ needs.create-release.outputs.has-releases == 'true'
&& github.repository == 'bottlerocket-os/twoliter'
}}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -151,10 +153,15 @@ jobs:
# Mark the Github Release™ as a non-draft now that everything has succeeded!
publish-release:
if: github.repository == 'bottlerocket-os/twoliter'
# Only run after all the other tasks, but it's ok if upload-artifacts was skipped
needs: [create-release, upload-artifacts]
if: ${{ always() && needs.create-release.result == 'success' && (needs.upload-artifacts.result == 'skipped' || needs.upload-artifacts.result == 'success') }}
if: >-
${{ github.repository == 'bottlerocket-os/twoliter'
&& always()
&& needs.create-release.result == 'success'
&& (needs.upload-artifacts.result == 'skipped'
|| needs.upload-artifacts.result == 'success')
}}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 15251cb

Please sign in to comment.