Skip to content

Commit

Permalink
change to add pdm.lock upon cahnge
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtimanmishrazipstack committed Jul 19, 2024
1 parent 77df775 commit 8ae54af
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/pdm-lock-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ jobs:
echo "Virtual environment already exists."
fi
source .venv/bin/activate
rm -r pdm.lock
pdm lock -G :all
git add pdm.lock
- name: Add pdm.lock
- name: Commit and push pdm.lock
if: steps.check.outputs.changed == 'true'
id: check_commit
run: |
Expand All @@ -79,22 +79,10 @@ jobs:
else
echo "Virtual environment already exists."
fi
source .venv/bin/activate
source .venv/bin/activate
pip install pre-commit~=3.6.2
git add .pre-commit-config.yaml
pre-commit run pdm-lock-check
echo "checking changes for $file_path for self branch before commit"
echo "changed=false" >> $GITHUB_OUTPUT
git diff --exit-code
if [ $? -ne 0 ]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push pdm.lock
if: steps.check_commit.outputs.changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git commit -m "Update pdm.lock for ${{ matrix.directory }}"
git push origin ${{ github.ref_name }}

0 comments on commit 8ae54af

Please sign in to comment.