Skip to content

Commit

Permalink
testing push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtimanmishrazipstack committed Jul 19, 2024
1 parent b18fd46 commit a8dc489
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/pdm-lock-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,32 @@ jobs:
fi
echo "checking changes for $file_path"
echo "changed=false" >> $GITHUB_ENV
echo "changed=false" >> $GITHUB_OUTPUT
if git diff --quiet main -- $file_path; then
echo "No changes detected in $file_path against main branch."
else
echo "Changes detected in $file_path against main branch."
echo "changed=true" >> $GITHUB_ENV
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Set output
id: set_output
run: echo "::set-output name=changed::${{ env.changed }}"

- name: Set up Python
if: steps.set_output.outputs.changed == 'true'
if: steps.check.outputs.changed == 'true'
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Set up Go
if: steps.set_output.outputs.changed == 'true'
if: steps.check.outputs.changed == 'true'
uses: actions/setup-go@v4
with:
go-version: '1.22.5'

- name: Install PDM
if: steps.set_output.outputs.changed == 'true'
if: steps.check.outputs.changed == 'true'
run: python -m pip install pdm==2.16.1

- name: Update and add pdm.lock
if: steps.set_output.outputs.changed == 'true'
if: steps.check.outputs.changed == 'true'
run: |
if [ "${{ matrix.directory }}" != "root" ]; then
cd ${{ matrix.directory }}
Expand All @@ -70,7 +66,7 @@ jobs:
git add pdm.lock
- name: Running pre-commit and commit pdm.lock
if: steps.set_output.outputs.changed == 'true'
if: steps.check.outputs.changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down

0 comments on commit a8dc489

Please sign in to comment.