Skip to content

feat: python version upgradation #25

feat: python version upgradation

feat: python version upgradation #25

name: Sync Precommit Config
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Extract config from script
run: |
chmod +x .github/scripts/extract_config.sh
.github/scripts/extract_config.sh
- name: Check if any file changed
id: changes
run: |
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit & push updates
if: steps.changes.outputs.changed == 'true'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add .
if git diff --cached --quiet; then
echo "No staged changes. Skipping commit."
exit 0
fi
git commit -m "Sync pre-commit YAML configs"
git push