Skip to content

Commit 597a31f

Browse files
committed
revert git workflow change
1 parent 52be765 commit 597a31f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/update_python_dependencies.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ jobs:
7878
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7979
GH_EVENT: ${{ github.event_name }}
8080
run: |
81+
# Take the current date, subtract from a release cut date in the past (Mar 6, 2024),
82+
# then get the num days % 42 (our release cadence is 42 days).
83+
# This will ensure it only runs the week after a release branch has been cut.
84+
days_diff=$(( ($(date +%s) - $(date --date="240306" +%s) )/(60*60*24)%42 ))
85+
if [[ $GH_EVENT != 'workflow_dispatch' && $days_diff -gt 6 ]]; then
86+
echo "Exiting early. We only update dependencies the week after we cut the release"
87+
exit 0
88+
fi
8189
branchName=weekly_update_python_dependencies_$(date +%s)
8290
git checkout -b $branchName
8391
git add -A

0 commit comments

Comments
 (0)