Skip to content

Feature request: Allow to configure the git clean parameters #823

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
0x53A opened this issue Jun 7, 2022 · 1 comment
Open

Feature request: Allow to configure the git clean parameters #823

0x53A opened this issue Jun 7, 2022 · 1 comment

Comments

@0x53A
Copy link

0x53A commented Jun 7, 2022

We are using self-hosted runners and would like to persist certain cache directories between runs.
It would be really useful if the clean parameter could be extended from a bool to a string.

For example, in gitlab I can set

variables:
    GIT_CLEAN_FLAGS: "-ffdx -e DirectoryIWouldLikeToKeep"

This should even be backwards compatible by first checking if clean is either true or false.

@EluvK
Copy link

EluvK commented Oct 14, 2022

Encountered the same problem, the compromise I used was to run git clean manually.

- name: Checkout repository
  uses: actions/checkout@v3
  with:
    clean: false

- name: Run Git Clean
  run: git clean -ffdx -e cache_directory/

Still need this feature to make it more elegant.

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

2 participants