Files
Echoion/.gitea/workflows/nightly.yml
T
faumaray 697db046d3
Modular container CI / release-build (push) Has been cancelled
Release: harden multiline secret handling
2026-07-30 03:58:21 +03:00

104 lines
3.4 KiB
YAML

name: Nightly product integration
on:
schedule:
- cron: '17 2 * * *'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: echoion-release-feed
cancel-in-progress: false
jobs:
publish-nightly:
runs-on: ubuntu-24.04
steps:
- name: Verify the Docker-capable Gitea runner
shell: bash
run: |
set -euo pipefail
test "$(uname -s)" = Linux
command -v docker
docker version
docker info
- name: Check out public signed main
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: main
fetch-depth: 0
persist-credentials: false
- name: Verify root cutover and check out locked components over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: |
set -euo pipefail
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
scripts/ci-checkout-components.sh \
"$PWD/components" \
"$PWD/dependencies"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
- name: Derive nightly identity and URLs
shell: bash
env:
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
API_URL: ${{ gitea.api_url }}
SERVER_URL: ${{ gitea.server_url }}
REPOSITORY: ${{ gitea.repository }}
RUN_NUMBER: ${{ gitea.run_number }}
run: |
set -euo pipefail
date_id=$(date -u +%Y%m%d)
owner=${REPOSITORY%%/*}
repo=${REPOSITORY#*/}
version=$(
python3 scripts/gitea_release.py \
--api-url "$API_URL" \
derive-nightly-version \
--owner "$owner" \
--repo "$repo" \
--cmake-file CMakeLists.txt \
--date-id "$date_id" \
--run-number "$RUN_NUMBER"
)
tag="nightly-${date_id}-${RUN_NUMBER}"
python3 scripts/validate-semver.py "$version"
{
printf 'RELEASE_TAG=%s\n' "$tag"
printf 'RELEASE_VERSION=%s\n' "$version"
printf 'RELEASE_CHANNEL=nightly\n'
printf 'RELEASE_SEQUENCE=%s\n' "$RUN_NUMBER"
printf 'RELEASE_ARTIFACT_BASE_URL=%s\n' \
"${SERVER_URL}/${REPOSITORY}/releases/download/${tag}"
printf 'RELEASE_FEED_URL=%s\n' \
"${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/nightly/catalog.json"
printf 'RELEASE_TARGET=%s\n' "$(git rev-parse HEAD)"
} >>"$GITHUB_ENV"
- name: Build and test all locked repositories in Docker
shell: bash
run: |
set -euo pipefail
scripts/release.sh \
--version "$RELEASE_VERSION" \
--skip-component-packages \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--official-update-feed-url "$RELEASE_FEED_URL" \
--update-channel nightly \
--update-sequence "$RELEASE_SEQUENCE"