Skip to content

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

Open
@mdhomer

Description

@mdhomer

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions