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

[Idea] Auto generate sparse-checkout patterns based on workflow trigger "paths" #1603

Open
mdhomer opened this issue Feb 6, 2024 · 0 comments

Comments

@mdhomer
Copy link

mdhomer commented Feb 6, 2024

The sparse-checkout feature is really useful for larger repos, I'm wondering if this feature could leverage the pre-defined paths definition for the github-actions workflow triggers.

So if you defined:

on:
  push:
    paths:
      - 'MyApplication/src'
      - 'MyApplicaton/tests'

The checkout step could have a features like:

- uses: actions/checkout@v4
  with:
    sparse-checkout-trigger-paths: true

Which would auto-generate the sparse-checkout patterns based on the paths provided in the workflow definition.

I'm thinking based on the fact most Application builds with source code will use triggers based on the code needed to build the application, and thus could be re-used when checking out said code.

This is a rough idea, so not sure if the example provided captures the best implementation :)

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

No branches or pull requests

1 participant