Files
DC_CMS/.gitea/workflows/ci.yml
T

38 lines
1.5 KiB
YAML

name: DC CMS qualification
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
jobs:
qualify:
runs-on: nodedc-node22-build
timeout-minutes: 20
steps:
- name: Check the exact pushed commit
env:
SOURCE_COMMIT: ${{ gitea.sha }}
SOURCE_RUN_ID: ${{ gitea.run_id }}
SOURCE_RUN_NUMBER: ${{ gitea.run_number }}
run: |
set -eu
python3 -c 'import os,re; assert re.fullmatch("[0-9a-f]{40}", os.environ["SOURCE_COMMIT"])'
job_root=$(mktemp -d)
trap 'rm -rf "$job_root"' EXIT
source_root="$job_root/DC_CMS"
mkdir "$source_root"
git -C "$source_root" init --quiet
git -C "$source_root" remote add origin https://git.dcserve.ru/SILVER/DC_CMS.git
git -C "$source_root" fetch --quiet --depth=1 origin "$SOURCE_COMMIT"
git -C "$source_root" checkout --quiet --detach FETCH_HEAD
python3 "$source_root/infra/ci/release.py" --commit "$SOURCE_COMMIT" --run-id "$SOURCE_RUN_ID" --run-number "$SOURCE_RUN_NUMBER" --output-dir "$GITHUB_WORKSPACE/release"
- name: Retain the qualified release in this Gitea run
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
with:
name: dc-cms-release
path: release
if-no-files-found: error
retention-days: 30
# Qualification has no production credentials. The NAS controller installs.