Skip to content

Fix corrupted requirements.txt (split merged lines, remove null bytes) #20

Fix corrupted requirements.txt (split merged lines, remove null bytes)

Fix corrupted requirements.txt (split merged lines, remove null bytes) #20

Workflow file for this run

name: Formatting Python Code
on: push
permissions:
contents: write # ✅ Allow pushing changes
jobs:
autoyapf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Format Python code with YAPF
id: automated-yapf
uses: KaustubhAs/automated-yapf-action@v1
with:
args: --style pep8 --recursive --in-place .
- name: Check for modified files
id: git-check
run: |
if git diff-index --quiet HEAD --; then
echo "modified=false" >> $GITHUB_OUTPUT
else
echo "modified=true" >> $GITHUB_OUTPUT
fi
- name: Push changes
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'kaustubhAS'
git config --global user.email 'kaustubhsonawane13@gmail.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Automated autoyapf fixes"
git push