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

CI: skip if triggering workflow failed #192

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

ugtthis
Copy link
Contributor

@ugtthis ugtthis commented Feb 15, 2025

Problem:

  • When Build workflow fails, Preview workflow still triggers
  • needs.preview.outputs.check_id is undefined (because preview job couldn't run)
  • Results in JavaScript syntax error from: check_run_id: ,
  • Ran into this problem wth PR RouteInfo: add route action buttons #164 when it didn't pass the test the first time, after I committed the updated white house address, I got the below error from Preview workflow
    Screenshot 2025-02-15 at 1 25 28 PM



Solution:

  • Add github.event.workflow_run.conclusion == 'success' to skip when triggering workflow failed
  • Put success check first for efficient short-circuit
  • Code also found in commai/website repo

Copy link

deployed preview: https://192.connect-d5y.pages.dev

Welcome to new-connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

Mobile

Desktop

@incognitojam incognitojam merged commit 60ca572 into commaai:master Feb 17, 2025
3 checks passed
@ugtthis ugtthis deleted the fix-preview-workflow-failure branch February 17, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants