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: Enhance CI reusability #66

Merged
merged 2 commits into from
Feb 21, 2025
Merged

Conversation

mitchnegus
Copy link
Member

@mitchnegus mitchnegus commented Feb 19, 2025

CI pipelines for model component repos currently cannot access the composite actions that are called in the reusable workflows for this repo. It seems that this is because GitHub actions defined in a called repo (e.g., sandialabs/firewheel) are executed as if they were defined in the caller repo (e.g., the MC repo).

An example of this failing behavior can be found in the recent CI pipeline for the firewheel_repo_dns repo. That repo cannot find .github/actions/prepare-tox because it's looking for it in the sandialabs/firewheel_repo_dns repository rather than sandialabs/firewheel where it actually lives.

I was hoping there might be a way to tell the caller repo to look for things in the called repo, but the closest related info I've found so far is an issue suggesting this might not be possible. There are many suggestions there, including those for choosing specific branches, but I think that it probably just makes the most sense for us to use the full path to the action (e.g., sandialabs/firewheel/.github/actions/prepare-tox) in our workflows until we need a more sophisticated system.

I quote the link to that issue here as a place to go looking if we eventually need a more complete strategy, such as a new repo only containing actions and similar to the CodeQL Action repo that is linked there.

@mitchnegus mitchnegus changed the title Enhance CI reusability ci: Enhance CI reusability Feb 19, 2025
@mitchnegus
Copy link
Member Author

Also, that danielchabr/pr-labels-check job seems to be unable to identify branches on forks. @sdelliot Do you know if there's a way to configure it to look at forked branches?

@mitchnegus mitchnegus added the ci Changes to our CI configuration files and scripts label Feb 19, 2025
@sdelliot
Copy link
Collaborator

Also, that danielchabr/pr-labels-check job seems to be unable to identify branches on forks. @sdelliot Do you know if there's a way to configure it to look at forked branches?

I believe that this is because we are not using pull_request_target in the .github/workflows/release-drafter.yml (see https://github.com/sandialabs/firewheel/pull/65/files) but it seems hard to test this relies on using information from the primary repository so merging/testing seems to be the only way. Additionally, there are some known security concerns that we will want to evaluate prior to making that change.

Copy link
Collaborator

@sdelliot sdelliot left a comment

Choose a reason for hiding this comment

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

LGTM

@sdelliot sdelliot merged commit a7a4d86 into sandialabs:main Feb 21, 2025
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Changes to our CI configuration files and scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants