-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create composite pre commit action #22
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
7ea30fe
Add pre-commit yaml
wagnerlmichael f9736d7
Move pre-commit action
wagnerlmichael ab57090
Move pre-commit config and add black
wagnerlmichael 93cc0bb
Add inputs and parser for hooks
wagnerlmichael 4713b7a
Add path slash
wagnerlmichael a1415ff
Add py script
wagnerlmichael 6f287c7
Fix path
wagnerlmichael ff54214
Add action_path variable
wagnerlmichael 386dbf7
Remove path component
wagnerlmichael 908db62
Add pyyaml install
wagnerlmichael 153d548
Add debugging code
wagnerlmichael 6e1d0d0
Add bash script to parse hooks
wagnerlmichael 8557668
Edit cache and path info
wagnerlmichael 261eaa1
Change concat syntax
wagnerlmichael db45dc1
Remove extra pre-commit froom paths
wagnerlmichael 437efa6
Remove quotes on parsed_hooks
wagnerlmichael 996b19d
Try for loop approach
wagnerlmichael 7fb8604
Remove py script
wagnerlmichael a7c9e68
Remove pyyaml import
wagnerlmichael 99a5700
Add pre commit config at root
wagnerlmichael 82bfbd3
Remove yamllint for now
wagnerlmichael e6e4989
Re-add yaml
wagnerlmichael 423eedf
Fix yaml errors
wagnerlmichael 2fe390a
Fix yaml errors
wagnerlmichael 2b1d3a3
Fix yaml errors
wagnerlmichael ae9483b
Reset path
wagnerlmichael 9d7be96
Remove top level pre-commit-config
wagnerlmichael e6dca78
Shorten line
wagnerlmichael edc62e6
Add top level pre-commit config
wagnerlmichael 41aa429
Remove python instantiations
wagnerlmichael d7aff64
Change cache version
wagnerlmichael 1c1d5f5
Update pre-commit/action.yaml
wagnerlmichael 8acf569
Update pre-commit/action.yaml
wagnerlmichael 0b84ffa
Remove hook parsing logic
wagnerlmichael 5ab94c7
Change string format
wagnerlmichael 6f0687e
Remove embedded pre-commit config
wagnerlmichael 074887d
Rever pre-commit run
wagnerlmichael f5c02dd
Remove empty line
wagnerlmichael 6095421
Remove double line
wagnerlmichael d71152a
Re work pre-commit
wagnerlmichael 0cb04f7
Add new line
wagnerlmichael 7635533
Remove master reference
wagnerlmichael ca5a36b
Change step name
wagnerlmichael File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: pre-commit | ||
description: Runs pre-commit hooks | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pre-commit | ||
run: sudo apt-get install pre-commit | ||
shell: bash | ||
|
||
- name: Cache pre-commit environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit-${{ hashFiles('/.pre-commit-config.yaml') }} | ||
|
||
- name: Run pre-commit | ||
run: pre-commit run --show-diff-on-failure --color=always --all-files | ||
shell: bash |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion, non-blocking] Nice! Note that there will be a bit of a catch-22 when merging this -- the new action won't be on the
main
branch until we merge the PR, so CI checks will fail if you try to adjust the version before merging, but after you merge the branch will be deleted, so checks will also fail. There are two ways to get around this:I'm fine with either, just let me know what your plan is and we'll go from there!