Skip to content

Commit 5a4b2fb

Browse files
authored
Merge pull request #14764 from apache/retry-snapshot-publish
Automatically retry snapshot publishing - 3 times
2 parents 9d7bb8c + f6e816b commit 5a4b2fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,17 @@ jobs:
229229
with:
230230
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
231231
- name: "📤 Publish Grails-Core Snapshot Artifacts"
232+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
232233
env:
233234
GRAILS_PUBLISH_RELEASE: 'false'
234235
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
235236
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
236237
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW }}
237-
run: ./gradlew publish
238+
with:
239+
timeout_seconds: 900 # normal range 360-720s
240+
max_attempts: 3 # Attempts to address: Could not write to resource 'https://repository.apache.org/content/repositories/snapshots/...' Read timed out
241+
retry_wait_seconds: 180
242+
command: ./gradlew publish
238243
- name: "🔨 Create Grails Wrapper Distribution Zip"
239244
run: >
240245
./gradlew :grails-wrapper:distZip

0 commit comments

Comments
 (0)