Files
Echoion/.gitea/workflows/ci.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

82 lines
2.5 KiB
YAML

name: Modular container CI
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
release-build:
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 root
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
persist-credentials: false
- name: Verify source-free root and resolve every lock 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: Build, test, and package without starting Echoion
env:
CI_VERSION: 2.0.0-ci.${{ gitea.run_number }}.${{ gitea.run_attempt }}
run: |
set -euo pipefail
scripts/release.sh \
--version "$CI_VERSION" \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--update-channel beta \
--update-sequence "${{ gitea.run_number }}"
- name: Test release control-plane scripts offline
shell: bash
run: |
set -euo pipefail
bash scripts/tests/test-gitea-tag-verification.sh
bash scripts/tests/test-component-ssh-secrets.sh
. scripts/lib/docker-daemon-path.sh
docker_workspace=$(docker_daemon_path "$PWD")
for test_script in \
scripts/tests/test_package_components.py \
scripts/tests/test_publish_component_feeds.py \
scripts/tests/test_gitea_release.py
do
docker run --rm --network none \
--volume "$docker_workspace:/workspace:ro" \
--workdir /workspace \
echoion-release-builder:gcc-16.1.0 \
python3 "$test_script"
done