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

Retrieve the matrix base config using repos #2

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Retrieve the matrix base config using repos #2

merged 1 commit into from
Oct 31, 2023

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Oct 31, 2023

The actions/checkout action is more flexible than recreating this via URLs. It can retrieve a single file from a git clone. This is especially useful where the repository stores the same file and you want to test changes to a pipeline as well as the matrix configuration.

Copy link
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

I kinda liked the URL as a fallback, but I guess with the sparse checkout it's as quick as it can get

build_matrix Outdated
Comment on lines 9 to 10
def main(matrix, include, exclude):
matrix = json.load(matrix)
Copy link
Member

Choose a reason for hiding this comment

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

the one matrix is a string, the other a dict, someone gonna yell at you (→ mypy).

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what you get for renaming variables.

The actions/checkout action is more flexible than recreating this via
URLs. It can retrieve a single file from a git clone. This is especially
useful where the repository stores the same file and you want to test
changes to a pipeline as well as the matrix configuration.
required: true
repository:
description: 'Repository to clone'
required: false
Copy link
Member

Choose a reason for hiding this comment

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

Optional without default value? Wouldn't it crash later?

Copy link
Member Author

Choose a reason for hiding this comment

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

In testing it appears to work as I expected. I think it has a value of null and then actions/checkout does the right thing.

@ekohl ekohl merged commit c635545 into v0 Oct 31, 2023
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.

3 participants