-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make option for excluding directories #1
Conversation
I'm kinda swamped right now so i really can't follow this thing but feel free to experiment! When I'll have time i'll merge your work and i will tag it as v2.
oh thats great, thanks!
Me neither, I was using the test branch to trigger individual runs and checking the results manually (at the time i was not that experienced with github actions either)
yeah i'm not that expert with bash either. though I'm pretty sure you can implement this feature with a python script, modifying the dockerfile to include a python distribution and changing the entry point to your "entrypoint.py". the performance impact should not be too significant.
I think a more standard way to do this would be to accept space (or comma?) separated globs, which will also cover the "i want to exclude a single file" case. if you do switch the action to python i think this would be a great way to implement it: |
I'll maybe take at look at it in the weekend. I think I'll stick with bash, it's good practice for me to do code in another language than python. I've maybe found a better solution than an exclude parameter. The problem in my project is that some of the staticfiles generated by django has CLRF endings. It struck me that I actually could use the actions as is, if i moved the check before the build stage. I like the |
yeah I believe this would be better for your specific use case. You could also move the action to a separate job in the same workflow
honestly i'd stick with the glob-based exclude which allows for more flexibility in all possible use cases. I think this might be a good solution: https://www.gnu.org/software/bash/manual/bash.html#Filename-Expansion
|
@Rotendahl I also need to exclude directories. This PR would be extremely helpful. |
I had to take a break but I should be able to check this out and merge it in the next days. I'll update the v1 tag so feel free to use that if you wanna get it asap |
great thanks @erclu |
Testing v1 now. Hmm, even without adding any 'exclude' the results seem to be odd messages such as:
See log at: https://github.com/jmckenna/MapServer/runs/1152302619?check_suite_focus=true I think there is a problem @Rotendahl . This was working before merging this into v1. Thoughts? |
I think we should revert these changes (as any deployment projects leveraging v1 now will all get these 'find' messages and passing tests, when it should fail on CRLF). Thoughts? Maybe keep v1 for pre-today, and use v1.1.0 to test the changes in this PR? (or "v1.1.0-dev") Let me know how to proceed. Oh should I use v1.0.0 for the live sites, as we test this PR? |
Ok falling back to v1.0.0 gives the expected results (meaning: before this PR was implemented). (see example expected results with v1.0.0: https://github.com/jmckenna/MapServer/runs/1152365919?check_suite_focus=true |
yeah I'm sorry about this i kinda hoped that everything was good because i'm not that familiar with bash. I think i'll just tag this as v2 and work (slowly) on fixing it. I'll put the v1 tag back to v1.0.0 so as to not break the action for people already using it |
thanks @erclu, I'll follow along the progress and test the exclude changes when its ready |
Hi.
I was looking for an action to remove CRLF's from file and found your repo.
Right now the action does not work for my project.
I have some staticfiles built by the django framework that causes the action to fail.
I figured a good solution would be a way to exclude directories from the action.
I've added a parameter "exclude" which takes a space separated list of directors to
accept CRLFs in.
I also fixed the todo such that the exit code is the number of files with CRLF.
This is the first time I'm playing with GitHub actions, so I'm not sure how to test it.
Let me know if you have any improvements I normally work with python and have not done a lot of bash scripting.