Gitea CI / Check code and tests (pull_request) Successful in 6m9s
Gitea CI / Build Android APK (pull_request) Successful in 3m35s
Gitea CI / Build Windows x64 app (pull_request) Successful in 7m45s
Gitea CI / Audit and package Windows x64 (pull_request) Failing after 1m41s
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 2s
70 lines
2.6 KiB
YAML
70 lines
2.6 KiB
YAML
name: Upload CI artifact with bounded retries
|
|
description: Save an artifact with at most three attempts, replacing incomplete uploads of the same name.
|
|
inputs:
|
|
name:
|
|
description: Artifact name, unique to this job in the workflow run
|
|
required: true
|
|
path:
|
|
description: Files and directories to upload
|
|
required: true
|
|
compression-level:
|
|
description: ZIP compression level
|
|
default: '0'
|
|
retention-days:
|
|
description: Artifact retention in days
|
|
default: '30'
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Upload artifact (attempt 1 of 3)
|
|
id: first
|
|
continue-on-error: true
|
|
uses: https://github.com/actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
env:
|
|
ACTIONS_RESULTS_URL: ${{ env.CUTDEX_GITEA_INTERNAL_URL }}
|
|
with:
|
|
name: ${{ inputs.name }}
|
|
path: ${{ inputs.path }}
|
|
compression-level: ${{ inputs.compression-level }}
|
|
retention-days: ${{ inputs.retention-days }}
|
|
if-no-files-found: error
|
|
include-hidden-files: true
|
|
overwrite: true
|
|
- name: Wait before second upload attempt
|
|
if: ${{ !cancelled() && steps.first.outcome == 'failure' }}
|
|
shell: pwsh
|
|
run: Start-Sleep -Seconds 5
|
|
- name: Upload artifact (attempt 2 of 3)
|
|
id: second
|
|
if: ${{ !cancelled() && steps.first.outcome == 'failure' }}
|
|
continue-on-error: true
|
|
uses: https://github.com/actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
env:
|
|
ACTIONS_RESULTS_URL: ${{ env.CUTDEX_GITEA_INTERNAL_URL }}
|
|
with:
|
|
name: ${{ inputs.name }}
|
|
path: ${{ inputs.path }}
|
|
compression-level: ${{ inputs.compression-level }}
|
|
retention-days: ${{ inputs.retention-days }}
|
|
if-no-files-found: error
|
|
include-hidden-files: true
|
|
overwrite: true
|
|
- name: Wait before final upload attempt
|
|
if: ${{ !cancelled() && steps.first.outcome == 'failure' && steps.second.outcome == 'failure' }}
|
|
shell: pwsh
|
|
run: Start-Sleep -Seconds 15
|
|
- name: Upload artifact (attempt 3 of 3)
|
|
id: third
|
|
if: ${{ !cancelled() && steps.first.outcome == 'failure' && steps.second.outcome == 'failure' }}
|
|
uses: https://github.com/actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
env:
|
|
ACTIONS_RESULTS_URL: ${{ env.CUTDEX_GITEA_INTERNAL_URL }}
|
|
with:
|
|
name: ${{ inputs.name }}
|
|
path: ${{ inputs.path }}
|
|
compression-level: ${{ inputs.compression-level }}
|
|
retention-days: ${{ inputs.retention-days }}
|
|
if-no-files-found: error
|
|
include-hidden-files: true
|
|
overwrite: true
|