mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-20 21:35:17 +02:00
ci: retry snap store upload on transient connection drops (#38461)
Add a retry to snapstore. Claude can't seem to figure out the reason why so many nightly uploads fail and the only logical conclusion is it's a server-side issue at Canonical, so retries might help. Example: https://github.com/go-gitea/gitea/actions/runs/29395231850/job/87287126446
This commit is contained in:
13
.github/workflows/release-nightly-snapcraft.yml
vendored
13
.github/workflows/release-nightly-snapcraft.yml
vendored
@@ -27,9 +27,14 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1.3.0
|
||||
id: build
|
||||
- uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 # v1.2.0
|
||||
# retry snapcraft uploads which can be flaky
|
||||
- name: Publish snap
|
||||
run: |
|
||||
for attempt in 1 2 3 4 5; do
|
||||
snapcraft upload "${{ steps.build.outputs.snap }}" --release latest/edge && exit 0
|
||||
echo "::warning::snap upload attempt $attempt failed, retrying in 15s"
|
||||
sleep 15
|
||||
done
|
||||
exit 1
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||
with:
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
release: latest/edge
|
||||
|
||||
Reference in New Issue
Block a user