-
All, I think I’m an idiot as I can’t seem to figure this out. Namely, a repo I work with can have both trivial and non-trivial PRs. We have our developers label the trivial ones with a label “0 diff trivial”. What I’d like is to have those PRs not run a rather expensive CI step (takes 30 minutes to build) as changing a README file shouldn’t need that. So following some other threads here I have something a la:
My guess is my problem is with not knowing GitHub Actions if syntax. I thought:
was the right way to say “Run this job step only if the labels do not have trivial”, but tests seem to show this causes an expensive test. 😕 (Note: I might have other issues as well. Since I care about labels, I added to the types of the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Sigh. I might have figured this out. I actually decided to read the documentation carefully and:
After staring at the GitHub API docs,
seems more correct. |
Beta Was this translation helpful? Give feedback.
-
Try wrapping your condition with the double
|
Beta Was this translation helpful? Give feedback.
-
for future people, i struggled getting this to work with multiple labels.. the format is:
|
Beta Was this translation helpful? Give feedback.
Sigh. I might have figured this out. I actually decided to read the documentation carefully and:
After staring at the GitHub API docs,
labels
is an array, which means contains seems to be looking for a “full string” (as it were) not just something in the string. Thus:seems more correct.