-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix syntax for some if-conditions in ci.yaml
#11109
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -273,9 +273,7 @@ jobs: | |
- determine_changes | ||
# Only runs on pull requests, since that is the only we way we can find the base version for comparison. | ||
# Ecosystem check needs linter and/or formatter changes. | ||
if: github.event_name == 'pull_request' && ${{ | ||
needs.determine_changes.outputs.code == 'true' | ||
}} | ||
if: ${{ github.event_name == 'pull_request' && needs.determine_changes.outputs.code == 'true' }} | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -554,7 +552,7 @@ jobs: | |
benchmarks: | ||
runs-on: ubuntu-latest | ||
needs: determine_changes | ||
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }} | ||
if: ${{ github.repository == 'astral-sh/ruff' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be skipped for forks because our codspeed token is only valid for This is quite a long line. I think there are ways of doing multiline if-conditions in GitHub Actions, but they seem to be pretty poorly documented, and I've got it wrong frequently in the past. I'd prefer to just do a very long single-line if-condition, as I currently have. |
||
timeout-minutes: 20 | ||
steps: | ||
- name: "Checkout Branch" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax is incorrect here; this currently seems to always evaluate to
true
when I sync themain
branch of my fork with the upstreammain