Skip to content

Commit

Permalink
Update GHA workflow to eliminate some redundant jobs (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
popematt authored Apr 17, 2024
1 parent 8b06c6f commit 47dc9bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
# TODO: See if this job can be turned into a reusable component
name: Setup Build Matrix
runs-on: ubuntu-latest
# We want to run on external PRs, but not on internal ones as push automatically builds
# H/T: https://github.com/Dart-Code/Dart-Code/commit/612732d5879730608baa9622bf7f5e5b7b51ae65
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-rust'
strategy:
matrix:
# We're using a matrix with a single entry so that we can define some config as YAML rather than
Expand Down Expand Up @@ -131,7 +134,9 @@ jobs:
needs: build
name: Build and Test Confirmation
runs-on: ubuntu-latest
if: always()
# We must include always() even with additional conditions in order to override the default status check of
# success() that is automatically applied to if conditions that don't contain a status check function.
if: ${{ always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-rust') }}
steps:
- run: echo ${{ needs.build.result }}
- if: needs.build.result != 'success'
Expand Down

0 comments on commit 47dc9bd

Please sign in to comment.