Skip to content

Comments

ci: Turn off nightly analysis and wheel workflows for user forks#5042

Merged
lgritz merged 4 commits intoAcademySoftwareFoundation:mainfrom
lgritz:lg-nonightly
Feb 13, 2026
Merged

ci: Turn off nightly analysis and wheel workflows for user forks#5042
lgritz merged 4 commits intoAcademySoftwareFoundation:mainfrom
lgritz:lg-nonightly

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Feb 12, 2026

No description provided.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@brechtvl
Copy link
Contributor

Thanks!

@brechtvl
Copy link
Contributor

I don't think this actually works, if seems not supported there but silently ignored?

Maybe this approach is better
https://hugovk.dev/blog/2023/til-how-to-disable-cron-for-github-forks/

 jobs:
   test:
+    if: ${{ github.event.repository.fork == false || github.event_name != 'schedule' }}
     runs-on: ubuntu-latest

@lgritz
Copy link
Collaborator Author

lgritz commented Feb 13, 2026

I don't think this actually works, if seems not supported there but silently ignored?

Maybe this approach is better https://hugovk.dev/blog/2023/til-how-to-disable-cron-for-github-forks/

 jobs:
   test:
+    if: ${{ github.event.repository.fork == false || github.event_name != 'schedule' }}
     runs-on: ubuntu-latest

Oh, that's MUCH better!

Signed-off-by: Larry Gritz <lg@larrygritz.com>
# Full nightly build
- cron: "0 8 * * *"
if: github.repository == 'AcademySoftwareFoundation/OpenImageIO'
if: github.event.repository.fork == false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, I don't think if is supported here.

If I search for ".if" on this page, it's only for jobs and job steps.
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, Fixing that too and just posted another update

@lgritz lgritz force-pushed the lg-nonightly branch 2 times, most recently from 61d0399 to d3b8a83 Compare February 13, 2026 01:08
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Copy link
Contributor

@brechtvl brechtvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me now, just one unnecessary repetition.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz
Copy link
Collaborator Author

lgritz commented Feb 13, 2026

I'll merge after CI finishes (which of course, does not test whether I've done it right, only whether I've completely broken the workflow scripts).

I guess we'll find out by tomorrow morning if it really worked -- by seeing if our forks did any real work overnight.

@lgritz lgritz merged commit 758082a into AcademySoftwareFoundation:main Feb 13, 2026
90 of 91 checks passed
@lgritz lgritz deleted the lg-nonightly branch February 13, 2026 05:32
@lgritz
Copy link
Collaborator Author

lgritz commented Feb 13, 2026

Looking at jobs for my fork, it does look like it skipped (well, started but immediately terminated) all of the nightly cron jobs on my fork. So I think this worked!

ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Feb 24, 2026
…ion#5042)

Also switch to a better idiom for detecting if we're a fork.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
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