File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ name: Update Poetry lock on a regular basis
22
33on :
44 schedule :
5- - cron : ' 0 4 * * 0' # weekly at 04:00 on Sunday -> https://crontab.guru/#0_4_*_*_0
5+ - cron : " 0 4 * * 0" # weekly at 04:00 on Sunday -> https://crontab.guru/#0_4_*_*_0
66 workflow_dispatch :
77
88env :
99 # Versions are also listed in PR.yml
1010 POETRY_VERSION : 1.2.2
11- PYTHON_VERSION : 3.9 # Use latest
11+ PYTHON_VERSION : 3.9 # Use latest
1212
1313jobs :
1414 org-check :
5656 git push --force --set-upstream origin ${{ steps.vars.outputs.branch_name }}
5757 # based on https://stackoverflow.com/a/73340290/8100990
5858 - name : Create Pull Request
59- run : |
59+ run : |
60+ echo "Changed files:"
61+ git diff --name-only HEAD origin/main --exit-code
62+
63+ if [[ $? ]]; then
64+ echo "Changes detected, creating PR"
65+ else
66+ echo "No changes detected, exiting"
67+ exit 0
68+ fi
69+
6070 gh pr create -B main -H ${{ steps.vars.outputs.branch_name }} --title 'Update poetry lock and reformat' --body '# Update Poetry Lock
6171
6272 Ran:
You can’t perform that action at this time.
0 commit comments