mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-23 23:05:19 +02:00
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
41 lines
1.0 KiB
YAML
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 }}
|