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

Check the repository owner in CI tasks #1792

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

sauclovian-g
Copy link
Contributor

I discovered recently after updating a fork I'd had sitting around that its periodic CI runs on master were failing.

Apparently it isn't possible to have scheduled runs that are skipped in forks (see https://github.com/orgs/community/discussions/16109 for an open/ignored feature request) but it is at least possible to have them not break.

…orks.

- don't try to sign things
- don't try to push images
- don't try to build and push the docs

(maybe it should build and not push the docs, but building the docs
was already turned off, just not fully)
@sauclovian-g sauclovian-g added bug Something not working correctly CI Continuous integration labels Jan 30, 2025
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

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

This is great! We should also port this over to the crucible and saw-script CI, both of which do signing and Docker builds.

@sauclovian-g sauclovian-g merged commit 3a8dfb6 into master Jan 30, 2025
50 checks passed
@sauclovian-g sauclovian-g deleted the tidy-ci-in-forks branch January 30, 2025 20:41
Copy link
Member

@kquick kquick left a comment

Choose a reason for hiding this comment

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

Is there a reason to check github.event.pull_request.head.repo.fork if we are testing github.repository_owner? Does the latter subsume the former?

It would also be good to add some comments in the yaml file explaining the purpose of using github.repository_owner over a pull_request test (i.e. the scheduled tasks, which do not have a pull request context).

@sauclovian-g
Copy link
Contributor Author

That's a good question. I think it won't if we create our own fork within the GH organization (or at least, it would make sense that way) ... it is not completely implausible that we might do that sometime.

Re the comments I'll make another changeset...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something not working correctly CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants