58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: Daily Release Archive
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: 'Only inspect and report; do not write releases'
|
|
default: 'true'
|
|
required: true
|
|
tag:
|
|
description: 'Optional source tag; empty means all published releases'
|
|
default: ''
|
|
required: false
|
|
verify_all:
|
|
description: 'Full verification (also performed by default)'
|
|
default: 'true'
|
|
required: false
|
|
|
|
concurrency:
|
|
group: daily-release-archive
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout trusted synchronization code
|
|
uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
with:
|
|
persist-credentials: false
|
|
- name: Test synchronization logic
|
|
run: python3 -m unittest discover -s tests -v
|
|
- name: Synchronize and verify releases
|
|
env:
|
|
SOURCE_GITEA_TOKEN: ${{ secrets.SOURCE_GITEA_TOKEN }}
|
|
TARGET_GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
ARCHIVE_ANCHOR_SHA: '92634afb073b81216388c9288cbf275ba1e11a2c'
|
|
SYNC_DRY_RUN: ${{ github.event.inputs.dry_run }}
|
|
SYNC_TAG: ${{ github.event.inputs.tag }}
|
|
run: |
|
|
set -eu
|
|
args=()
|
|
if [ "${SYNC_DRY_RUN:-false}" = "true" ]; then args+=(--dry-run); fi
|
|
if [ -n "${SYNC_TAG:-}" ]; then args+=(--tag "$SYNC_TAG"); fi
|
|
python3 scripts/sync_releases.py "${args[@]}"
|
|
- name: Save synchronization report
|
|
if: always()
|
|
uses: https://github.com/actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: release-sync-report
|
|
path: sync-report.json
|
|
if-no-files-found: warn
|
|
retention-days: 90
|