Skip to content

Commit bc76bff

Browse files
committed
use variable for max time
1 parent 2eb4fc6 commit bc76bff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/jreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ jobs:
130130
git merge --ff-only ${{ env.BRANCH_NAME }}
131131
- name: Attempt Push with Retry
132132
env:
133-
MAX_RETRIES: 60
133+
RETRY_MAX_TIME: 600
134134
RETRY_INTERVAL: 10
135135
run: |
136136
START_TIME=$(date +%s)
137137
while true; do
138138
git push origin main && break
139139
ELAPSED_TIME=$(( $(date +%s) - START_TIME ))
140-
if [ "$ELAPSED_TIME" -ge 600 ]; then
141-
echo "Push failed after $MAX_RETRIES attempts. Exiting..."
140+
if [ "$ELAPSED_TIME" -ge $RETRY_MAX_TIME ]; then
141+
echo "Push failed after $RETRY_MAX_TIME seconds. Exiting..."
142142
exit 1
143143
fi
144144

0 commit comments

Comments
 (0)