Skip to content

Commit ba57033

Browse files
committed
dont make pr if empty?
1 parent a467653 commit ba57033

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

action.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@ runs:
5656
set -e
5757
echo "Updating ${{inputs.project_file_name}} using schedule ${{inputs.schedule_path}}"
5858
pixi run --manifest-path ${{ github.action_path }}/pyproject.toml update-dependencies "${{ github.workspace }}/${{ inputs.project_file_name }}" "${{ github.workspace }}/${{ inputs.schedule_path }}"
59-
- name: Show changes
59+
- name: Show changes and skip if none
6060
shell: bash
6161
run: |
6262
echo "Showing changes that would be committed"
6363
git --no-pager diff ${{ inputs.project_file_name }}
64+
if git diff --quiet ${{ inputs.project_file_name }}; then
65+
echo "No changes to commit"
66+
exit 0
67+
fi
6468
- name: Create Pull Request
6569
if: ${{ inputs.create_pr == 'true' }}
6670
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)