Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GHA workflow to eliminate some redundant jobs #744

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading