Skip to content

Add exclude_from_clean option #2141

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add exclude_from_clean option #2141

wants to merge 1 commit into from

Conversation

bonaert
Copy link

@bonaert bonaert commented Apr 10, 2025

See: #862

Adds a exclude_from_clean option, which excludes the specified path from the clean operation. More concretely, if a value is provided, the action runs git clean -ffdx -e <exclude_from_clean> && git reset --hard HEAD instead of running git clean -ffdx && git reset --hard HEAD.

This is particularly useful for self-hosted runners, where deleting and re-creating certain directories can sometimes be inneficient and costly (examples: node_modules, git LFS files)

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.

2 participants