-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLD: Attempt 7 to add a github pre-commit hook
- Loading branch information
Yury Zabegaev
committed
Oct 17, 2024
1 parent
290edfc
commit fd014e4
Showing
2 changed files
with
47 additions
and
4 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Update protocol docstrings | ||
|
||
# Run this workflow on every push or pull request to the main branch | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
run-python-script: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Python | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12.7' | ||
|
||
# Run the Python script | ||
- name: Run Python script | ||
run: python build_tools/protocol_docstrings_script.py | ||
|
||
# Configure Git to commit and push the changes | ||
- name: Set up Git user info | ||
run: | | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email '[email protected]' | ||
# Check if there are any changes and commit them | ||
- name: Commit and push changes | ||
run: | | ||
touch test.txt | ||
git add . | ||
git commit -m "Update files via Python script" || echo "No changes to commit" | ||
git push origin HEAD:${{ github.ref }} |
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