Files
gitea/.github/workflows/release-nightly-snapcraft.yml
silverwind b4e601339f 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
2026-07-16 21:56:31 +00:00

41 lines
1.0 KiB
YAML

name: release-nightly-snapcraft
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-publish:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
fetch-depth: 0
- uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1.3.0
id: build
# 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 }}