@@ -2,7 +2,8 @@ name: Weekly Poetry Update
2
2
3
3
on :
4
4
schedule :
5
- - cron : ' 0 0 * * 0' # Runs every Sunday at midnight
5
+ # - cron: '0 0 * * 0' # Runs every Sunday at midnight
6
+ - cron : ' 0 * * * *' # Runs every hour for testing purposes
6
7
7
8
jobs :
8
9
update-dependencies :
29
30
run : |
30
31
git config --global user.name 'github-actions[bot]'
31
32
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
32
- git checkout -b update-dependencies-$(date +%Y%m%d)
33
+ git checkout -b update-dependencies-$(date +%Y%m%d%H%M )
33
34
34
35
- name : Install dependencies
35
36
run : poetry install
@@ -42,32 +43,32 @@ jobs:
42
43
git add poetry.lock
43
44
if git diff-index --quiet HEAD; then
44
45
echo "No changes detected, creating an empty commit."
45
- git commit --allow-empty -m "chore(deps): :arrows_counterclockwise: no updates for $(date +%Y%m%d)"
46
+ git commit --allow-empty -m "chore(deps): :arrows_counterclockwise: no updates for $(date +%Y%m%d%H%M )"
46
47
else
47
48
echo "Changes detected, creating a commit with update log."
48
49
if [ -f poetry-update.log ]; then
49
50
update_log=$(cat poetry-update.log)
50
51
else
51
52
update_log="No update log available."
52
53
fi
53
- git commit -m "$(echo -e "chore(deps): :arrows_counterclockwise: update dependencies $(date +%Y%m%d)\n\n$update_log")"
54
+ git commit -m "$(echo -e "chore(deps): :arrows_counterclockwise: update dependencies $(date +%Y%m%d%H%M )\n\n$update_log")"
54
55
fi
55
56
56
57
- name : Push changes
57
58
run : |
58
- git push -f origin update-dependencies-$(date +%Y%m%d)
59
+ git push -f origin update-dependencies-$(date +%Y%m%d%H%M )
59
60
60
61
- name : Create Pull Request via gh
61
62
run : |
62
- gh pr create --title "chore(deps): :arrows_counterclockwise: update dependencies $(date +%Y%m%d)" \
63
+ gh pr create --title "chore(deps): :arrows_counterclockwise: update dependencies $(date +%Y%m%d%H%M )" \
63
64
--body "This is an auto-generated pull request to update dependencies in poetry.lock." \
64
65
--base main \
65
- --head update-dependencies-$(date +%Y%m%d)
66
+ --head update-dependencies-$(date +%Y%m%d%H%M )
66
67
env :
67
68
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68
69
69
- - name : Set Auto PR
70
+ - name : Merge Pull Request via gh
70
71
run : |
71
- gh pr merge update-dependencies-$(date +%Y%m%d) --auto --rebase
72
+ gh pr merge update-dependencies-$(date +%Y%m%d%H%M ) --merge --auto
72
73
env :
73
74
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments