CI e installatore: commenti degli script in inglese (#43)

La regola del progetto è «codice e commenti in inglese; interfaccia, documenti
e messaggi in italiano», e gli script di .gitea/ (script e flussi), di
installer/ e docker/entrypoint.sh avevano ancora i commenti in italiano
(decisione di Alberto del 29 novembre 2026). Cambiano solo i commenti: i
messaggi che una persona legge (echo, ::warning::, ::error::, nomi dei passi,
note della release) restano in italiano e nessun comando cambia. I programmi
awk e gli script finti delle prove erano già in inglese.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-29 12:03:13 +01:00
1 parent f48384b7d4
commit 009e7d6710
18 files changed
+496 -495

No files matched your search

+23 -22
View File
@@ -1,22 +1,22 @@
# Pulizia del lunedì (alle 4:17, ora del server di Gitea) e a mano (Actions ▸ pulizia ▸ Esegui) del demone Docker del
# runner e del registro dei container. A mano, con «Solo prova» spuntato, elenca che cosa toglierebbe e non toglie
# nulla: da lanciare prima della prima pulizia vera e dopo ogni cambio dello script.
# Ogni esecuzione di verifica e di rilascio toglie già ciò che crea e, per tutti, le immagini senza nome e la cache di
# costruzione penzolante non usata da 24 ore. Qui, dal 21 ottobre 2026 (decisione di Alberto: eliminare tutto ciò che
# non serve più), si toglie anche ciò che non serve più a nessuno, di qualunque progetto (pulizia-docker.sh completa):
# - i resti della CI di Febe: contenitori di prova fermi (etichetta febe.ci.prova e nome febe-prova-<esecuzione>, mai
# le etichette febe.ci.* che un Febe vero eredita dall'immagine), nomi locali febe-ci:<esecuzione>, builder
# febe-ci-<esecuzione>, l'immagine febe:ci del vecchio flusso;
# - i resti di act_runner: contenitori fermi, volumi e reti GITEA-ACTIONS-TASK-… che nessun contenitore usa, più
# vecchi di 90 minuti;
# - le immagini che nessun contenitore usa, né acceso né fermo, create più di 24 ore fa (di un'immagine in uso Docker
# toglie i nomi in più), e la cache di costruzione del demone non usata da 24 ore. Le immagini di base
# (debian:trixie, moby/buildkit, …) si riscaricano alla prima esecuzione che le chiede;
# - con il segreto REGISTRY_TOKEN, le etichette sha- del registro oltre le 10 più recenti, mai main, latest o X.Y.Z,
# e gli artefatti della CI (pacchetto generico febe-ci, artefatti.sh) creati più di 14 giorni fa.
# Mai system prune, container prune, volume prune o network prune; mai un contenitore, un volume o una rete che non sia
# della CI. Un contenitore di prova ancora acceso si segnala e il lavoro diventa rosso; un rifiuto dell'API del
# registro è solo un avviso. Dettagli in .gitea/scripts/pulizia-docker.sh e in docs/processo.md, «Pulizia».
# Monday cleanup (at 4:17, Gitea server time) and by hand (Actions ▸ pulizia ▸ Esegui) of the runner's Docker daemon and
# of the container registry. By hand, with «Solo prova» ticked, it lists what it would remove and removes nothing: to
# be run before the first real cleanup and after every change to the script.
# Every verification and release run already removes what it creates and, for everyone, the unnamed images and the
# dangling build cache unused for 24 hours. Here, since 21 October 2026 (decision of Alberto: delete everything that
# is no longer needed), what nobody needs any more is removed too, of any project (pulizia-docker.sh completa):
# - the leftovers of the Febe CI: stopped test containers (label febe.ci.prova and name febe-prova-<esecuzione>,
# never the febe.ci.* labels a real Febe inherits from the image), local names febe-ci:<esecuzione>, builders
# febe-ci-<esecuzione>, the febe:ci image of the old workflow;
# - the leftovers of act_runner: stopped containers, volumes and networks GITEA-ACTIONS-TASK-… no container uses,
# older than 90 minutes;
# - the images no container uses, running or stopped, created more than 24 hours ago (from an image in use Docker
# removes the extra names), and the daemon's build cache unused for 24 hours. The base images (debian:trixie,
# moby/buildkit, …) are downloaded again by the first run that asks for them;
# - with the REGISTRY_TOKEN secret, the registry's sha- tags beyond the 10 most recent, never main, latest or X.Y.Z,
# and the CI artifacts (generic package febe-ci, artefatti.sh) created more than 14 days ago.
# Never system prune, container prune, volume prune or network prune; never a container, a volume or a network that
# does not belong to the CI. A test container still running is reported and the job turns red; a refusal by the
# registry API is only a warning. Details in .gitea/scripts/pulizia-docker.sh and in docs/processo.md, «Pulizia».
name: pulizia
on:
@@ -67,9 +67,10 @@ jobs:
git checkout -q --force --detach "$GITHUB_SHA"
git log -1 --format='Commit %h: %s'
# Gitea 28 mette nell'evento la casella «prova» come testo, "true" o "false"; il lunedì l'evento non ha input e
# la pulizia è quella vera. Un avvio con l'API passa il valore così com'è: qualunque altro («True», «1») ferma il
# lavoro senza toccare nulla. Il token del registro va solo nell'ambiente di questo passo e non si stampa mai.
# Gitea 28 puts the «prova» checkbox in the event as text, "true" or "false"; on Monday the event has no inputs
# and the cleanup is the real one. A start through the API passes the value as it is: any other («True», «1»)
# stops the job without touching anything. The registry token goes only into this step's environment and is
# never printed.
- name: Pulizia completa del demone Docker e del registro
env:
PROVA: ${{ gitea.event.inputs.prova }}
+57 -57
View File
@@ -1,43 +1,43 @@
# Rilascio a ogni tag vX.Y.Z (anche vX.Y.Z-qualcosa per un'anteprima):
# 1. prove: il tag coincide con <Version> di Directory.Build.props, la soluzione si compila con gli avvisi come errori
# e tutte le prove passano, nello stesso contenitore Debian 13 della verifica (Chromium e Xvfb veri) e
# senza nessuna prova saltata. Senza prove verdi non si costruisce né si rilascia nulla;
# 2. windows: Febe.exe in un file solo, il programma di installazione nostro (src/Febe.Installer) e lo zip portabile
# (installer/costruisci.sh, gira su Linux con il solo .NET SDK): il cancello prima dell'immagine;
# 3. immagine: dopo l'installatore, l'immagine Docker (le prove girano anche dentro la build), provata senza rete e
# scansionata con Trivy come nella verifica (una CRITICAL con correzione ferma tutto), poi pubblicata sul registro
# dei container di Gitea come <registro>/<proprietario>/febe:X.Y.Z e :latest (solo per le versioni senza
# trattino). Il lavoro dice se l'ha pubblicata, e alla fine toglie sempre immagini, contenitori, cache e builder
# dell'esecuzione, poi le immagini senza nome e la cache di costruzione penzolante non usata da 24 ore di tutti i
# progetti del demone;
# 4. release: solo dopo le prove, l'installatore e l'immagine. Ricostruisce installatore e zip dallo stesso commit con
# lo stesso script (senza azioni non c'è un passaggio di artefatti fra i lavori che non dipenda da REGISTRY_TOKEN,
# e la release deve uscire anche senza), poi crea la release (o la completa, se esiste già) con installatore, zip
# portabile, modello Unraid e l'archivio per Docker Compose (compose.yml con il profilo seccomp accanto); le note
# dicono dove sta l'immagine, o che non è stata pubblicata.
# Release at every vX.Y.Z tag (also vX.Y.Z-something for a preview):
# 1. prove: the tag matches <Version> in Directory.Build.props, the solution builds with warnings as errors and all
# the tests pass, in the same Debian 13 container as the verification (real Chromium and Xvfb) and without any
# skipped test. Without green tests nothing is built or released;
# 2. windows: Febe.exe in a single file, our own installer (src/Febe.Installer) and the portable zip
# (installer/costruisci.sh, runs on Linux with the .NET SDK only): the gate before the image;
# 3. immagine: after the installer, the Docker image (the tests also run inside the build), tested without network
# and scanned with Trivy as in the verification (a CRITICAL with a fix stops everything), then published on the
# Gitea container registry as <registro>/<proprietario>/febe:X.Y.Z and :latest (only for versions without a
# dash). The job says whether it published it, and at the end it always removes the run's images, containers,
# cache and builder, then the unnamed images and the dangling build cache unused for 24 hours of all the
# daemon's projects;
# 4. release: only after the tests, the installer and the image. It rebuilds installer and zip from the same commit
# with the same script (without actions there is no way to pass artifacts between jobs that does not depend on
# REGISTRY_TOKEN, and the release must come out without it too), then creates the release (or completes it, if
# it already exists) with installer, portable zip, Unraid template and the Docker Compose archive (compose.yml
# with the seccomp profile next to it); the notes say where the image is, or that it was not published.
#
# Niente azioni, come nella verifica (decisione del 18 novembre 2026): sorgenti con git e il gettone del lavoro, SDK con
# .gitea/scripts/dotnet.sh, builder buildx con costruisci-immagine.sh builder, risultati delle prove e rapporto di Trivy
# nel pacchetto generico febe-ci (versione <versione>-rilascio.<numero>, con REGISTRY_TOKEN; artefatti.sh).
# No actions, as in the verification (decision of 18 November 2026): sources with git and the job token, SDK with
# .gitea/scripts/dotnet.sh, buildx builder with costruisci-immagine.sh builder, test results and Trivy report in the
# generic package febe-ci (version <versione>-rilascio.<numero>, with REGISTRY_TOKEN; artefatti.sh).
#
# Segreto del repository (Impostazioni ▸ Actions ▸ Segreti): REGISTRY_TOKEN, un token dell'utente con i permessi
# «package: read and write». Senza, l'immagine si costruisce e si prova ma non si pubblica: la release esce lo stesso,
# con l'installatore per Windows, e le sue note dicono che l'immagine di questa versione non c'è. Aggiunto il segreto,
# si rilancia il flusso del tag: l'immagine si pubblica e le note della release si correggono.
# Variabile facoltativa (Impostazioni ▸ Actions ▸ Variabili): REGISTRY, il nome del registro come lo raggiunge il
# runner (per esempio 192.168.30.23:3000); se manca si usa l'host dell'indirizzo del server Gitea (il suo ROOT_URL).
# Il registro risponde in HTTP: la pubblicazione passa da buildx con un builder proprio (docker-container) a cui la
# configurazione di buildkit dice che quel registro è in HTTP e insicuro, così non serve che il Docker del runner lo
# abbia fra gli insecure-registries. Le credenziali vanno nella configurazione del client Docker, senza «docker login»
# (che passerebbe dal demone, e il demone proverebbe HTTPS).
# Repository secret (Impostazioni ▸ Actions ▸ Segreti): REGISTRY_TOKEN, a user token with the permissions
# «package: read and write». Without it, the image is built and tested but not published: the release comes out
# anyway, with the Windows installer, and its notes say the image of this version is missing. Once the secret is
# added, the tag's workflow is run again: the image is published and the release notes are corrected.
# Optional variable (Impostazioni ▸ Actions ▸ Variabili): REGISTRY, the registry name as the runner reaches it (for
# example 192.168.30.23:3000); if missing, the host of the Gitea server address (its ROOT_URL) is used.
# The registry answers in HTTP: publishing goes through buildx with a builder of its own (docker-container) whose
# buildkit configuration says that registry is HTTP and insecure, so the runner's Docker does not need it among its
# insecure-registries. The credentials go into the Docker client configuration, without «docker login» (which would
# go through the daemon, and the daemon would try HTTPS).
name: rilascio
on:
push:
tags: ["v*"]
# Come la verifica e la pulizia: ogni passo con «bash -e -o pipefail», qualunque sia la shell predefinita del runner
# o del contenitore (i Sorgenti usano gli array di bash; in un contenitore Debian la predefinita sarebbe dash).
# Like the verification and the cleanup: every step with «bash -e -o pipefail», whatever the default shell of the
# runner or of the container (the Sorgenti step uses bash arrays; in a Debian container the default would be dash).
defaults:
run:
shell: bash
@@ -51,9 +51,9 @@ jobs:
prove:
runs-on: ubuntu-latest
timeout-minutes: 60
# Lo stesso ambiente delle prove della verifica: Debian 13 con Chromium e Xvfb veri e il riepilogo che non
# ammette prove saltate. Su ubuntu-latest le prove nel browser (fra cui il ritorno dopo l'accesso, return-path.js)
# sarebbero inconcludenti e un rilascio uscirebbe senza averle fatte.
# The same environment as the verification tests: Debian 13 with real Chromium and Xvfb and the summary that
# allows no skipped tests. On ubuntu-latest the browser tests (among them the return after sign-in,
# return-path.js) would be inconclusive and a release would come out without having run them.
container:
image: debian:trixie
options: --shm-size=1g
@@ -108,7 +108,7 @@ jobs:
dotnet test tests/Febe.Tests -c Release --no-build --nologo
--logger "trx;LogFileName=prove.trx" --results-directory out/prove
# Nessuna prova saltata: una prova inconcludente (per esempio senza Chromium) ferma il rilascio.
# No skipped test: an inconclusive test (for example without Chromium) stops the release.
- name: Riepilogo delle prove
if: ${{ !cancelled() }}
run: bash .gitea/scripts/riepilogo-prove.sh out/prove 0
@@ -128,7 +128,7 @@ jobs:
needs: prove
timeout-minutes: 30
env:
# Come l'installatore di verifica.yml: l'immagine del runner non garantisce ICU, e qui non serve.
# Like the installer job of verifica.yml: the runner image does not guarantee ICU, and it is not needed here.
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "true"
steps:
- name: Sorgenti
@@ -163,7 +163,7 @@ jobs:
immagine:
runs-on: ubuntu-latest
# Dopo l'installatore: :X.Y.Z e :latest escono solo se anche la release potrà uscire.
# After the installer: :X.Y.Z and :latest come out only if the release can come out too.
needs: [prove, windows]
timeout-minutes: 60
env:
@@ -198,7 +198,7 @@ jobs:
git checkout -q --force --detach "$GITHUB_SHA"
git log -1 --format='Commit %h: %s'
# Ciò che un'esecuzione interrotta non ha potuto togliere, e un tentativo precedente di questa stessa esecuzione.
# What an interrupted run could not remove, and an earlier attempt of this same run.
- name: Resti di esecuzioni interrotte
run: |
bash .gitea/scripts/pulizia-docker.sh residui 90
@@ -219,11 +219,11 @@ jobs:
echo "IMAGE=$REGISTRY/$OWNER/febe" >> "$GITHUB_ENV"
echo "immagine=$REGISTRY/$OWNER/febe" >> "$GITHUB_OUTPUT"
# Un builder buildx proprio, che sa che il registro di casa risponde in HTTP.
# A buildx builder of our own, which knows that the home registry answers in HTTP.
- name: Builder buildx dell'esecuzione
run: bash .gitea/scripts/costruisci-immagine.sh builder "$REGISTRY"
# Gli stessi argomenti ed etichette della pubblicazione (costruisci-immagine.sh): quella esce dalla cache di questa.
# The same arguments and labels as the publication (costruisci-immagine.sh): that one comes from this one's cache.
- name: Costruzione dell'immagine (le prove girano dentro la build)
run: |
bash .gitea/scripts/costruisci-immagine.sh archivio "$ARCHIVIO" "$PROVA"
@@ -267,37 +267,37 @@ jobs:
REGISTRO_UTENTE: ${{ gitea.actor }}
run: |
set -eu
# Le credenziali le mette costruisci-immagine.sh pubblica in una configurazione del client solo sua, tolta
# alla fine: buildx le passa al builder, il demone non c'entra.
# costruisci-immagine.sh pubblica puts the credentials in a client configuration of its own, removed at the
# end: buildx passes them to the builder, the daemon is not involved.
NOMI="$IMAGE:$VERSION"
case "$VERSION" in
*-*) echo "Versione di anteprima: :latest non si sposta." ;;
*) NOMI="$NOMI $IMAGE:latest" ;;
esac
# La stessa costruzione di prima (dalla cache del builder), questa volta spinta sul registro da buildx.
# The same build as before (from the builder's cache), this time pushed to the registry by buildx.
bash .gitea/scripts/costruisci-immagine.sh pubblica $NOMI
echo "pubblicata=si" >> "$GITHUB_OUTPUT"
- name: Pulizia (sempre)
if: always()
run: |
# La configurazione del client con le credenziali, se un'interruzione ha saltato la trap di chi l'ha scritta.
# The client configuration with the credentials, if an interruption skipped the trap of whoever wrote it.
rm -rf "${RUNNER_TEMP:-/tmp}/febe-docker-$ESECUZIONE"
if [ -n "${ARCHIVIO:-}" ]; then rm -f "$ARCHIVIO"; fi
bash .gitea/scripts/pulizia-docker.sh esecuzione "$ESECUZIONE"
# Poi, per tutti i progetti del demone, ciò che nessuno usa: immagini senza nome e cache di costruzione
# penzolante non usata da 24 ore. Non fa mai fallire il lavoro.
# Then, for all the daemon's projects, what nobody uses: unnamed images and dangling build cache unused for
# 24 hours. It never fails the job.
bash .gitea/scripts/pulizia-docker.sh penzolanti || echo "::warning::La pulizia di ciò che nessuno usa non è riuscita."
release:
runs-on: ubuntu-latest
# Le prove sono verdi, l'installatore c'è e l'immagine si è costruita: pubblicata, o non pubblicata per la sola
# mancanza del segreto (il lavoro «immagine» lo dice e le note lo riportano). Se la costruzione, la prova del
# contenitore, la scansione o la spinta sul registro falliscono, non esce nessuna release.
# The tests are green, the installer is there and the image was built: published, or not published only because
# the secret is missing (the «immagine» job says so and the notes report it). If the build, the container test,
# the scan or the push to the registry fail, no release comes out.
needs: [prove, windows, immagine]
timeout-minutes: 40
env:
# Come «windows»: l'immagine del runner non garantisce ICU, e per costruire l'installatore non serve.
# Like «windows»: the runner image does not guarantee ICU, and building the installer does not need it.
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "true"
steps:
- name: Sorgenti
@@ -324,7 +324,7 @@ jobs:
- name: SDK .NET 10
run: bash .gitea/scripts/dotnet.sh 10.0
# Lo stesso commit e lo stesso script del lavoro «windows», che ha già fatto da cancello prima dell'immagine.
# The same commit and the same script as the «windows» job, which already acted as the gate before the image.
- name: Febe.exe, programma di installazione e zip portabile per la release
run: bash installer/costruisci.sh "${GITHUB_REF_NAME#v}"
@@ -339,7 +339,7 @@ jobs:
set -eu
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
case "$VERSION" in *-*|0.*) PRE=true ;; *) PRE=false ;; esac # le versioni 0.x sono anteprime
case "$VERSION" in *-*|0.*) PRE=true ;; *) PRE=false ;; esac # 0.x versions are previews
NOTE=$(awk -v v="$VERSION" '/^## /{p=($2==v)} p' CHANGELOG.md || true)
[ -n "$NOTE" ] || NOTE="Febe $VERSION"
if [ "$PUBBLICATA" = "si" ]; then
@@ -353,8 +353,8 @@ jobs:
fi
NOTE=$(printf '%s\n\n### Immagine Docker\n\n%s\n' "$NOTE" "$IMMAGINE_NOTA")
# JSON letto e scritto con .gitea/scripts/json.sh (awk), niente jq. Le risposte di Gitea in un file: il
# lettore legge file, non un flusso.
# JSON read and written with .gitea/scripts/json.sh (awk), no jq. Gitea's responses go to a file: the reader
# reads files, not a stream.
RISPOSTA="${RUNNER_TEMP:-/tmp}/febe-release-${GITHUB_RUN_ID:-0}.json"
ID=""
if curl -sf -H "Authorization: token $TOKEN" "$API/releases/tags/$TAG" -o "$RISPOSTA"; then
@@ -371,7 +371,7 @@ jobs:
echo "Release $TAG creata (id $ID)"
else
[[ "$ID" =~ ^[0-9]+$ ]] || { echo "Identificativo della release inatteso: «$ID»." >&2; exit 1; }
# Le note dicono come è andata questa volta (per esempio: l'immagine ora è pubblicata).
# The notes say how it went this time (for example: the image is now published).
printf '{"body":%s}' "$(bash .gitea/scripts/json.sh stringa "$NOTE")" \
| curl -sf -X PATCH -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
--data-binary @- "$API/releases/$ID" > /dev/null
@@ -379,7 +379,7 @@ jobs:
fi
cp docker/unraid/febe.xml "out/febe-unraid-$VERSION.xml"
# compose.yml indica il profilo seccomp con un percorso relativo: l'archivio li porta insieme.
# compose.yml points to the seccomp profile with a relative path: the archive carries them together.
COMPOSE="out/febe-compose-$VERSION"
rm -rf "$COMPOSE"
mkdir -p "$COMPOSE/chromium"
+56 -57
View File
@@ -1,34 +1,34 @@
# Verifica: a ogni push su qualunque ramo (i tag li prende rilascio.yml) e a mano (Actions ▸ verifica ▸ Esegui).
# I suoi quattro lavori sono i controlli richiesti per unire in main (docs/processo.md):
# controlli sintassi degli script, flussi in YAML a blocchi e senza azioni, segni di conflitto, versione,
# progetti della soluzione, JSON; segreti in tutta la storia con gitleaks (versione e impronta fissate);
# prove compilazione di tutta la soluzione con gli avvisi come errori e tutte le prove di tests/Febe.Tests
# (mai «dotnet test» sulla soluzione intera: tests/Febe.Tests.Windows gira solo su Windows) con
# Chromium e Xvfb veri in un contenitore Debian 13: nessuna prova deve saltarsi, tranne le «da fare»
# di H264ConformanceTests.FeaturesStillToDo (riepilogo-prove.sh le conta a parte).
# Il mondo sintetico del sito di prova ha il seme 13 e, per la categoria SitoDiProva, anche il seme di
# questa esecuzione, scritto nel registro per rifare un errore;
# installatore Febe-Setup-<versione>-ci.<numero>.exe (il programma di installazione nostro, src/Febe.Installer) e
# lo zip portabile; serve solo il .NET SDK;
# immagine dopo l'installatore: l'immagine Docker costruita con buildx, provata senza rete (parte, salute,
# Chromium, it_IT) e scansionata con Trivy (si ferma per una CRITICAL con correzione); solo dopo un push
# su main la pubblica come :main e :sha-<7 caratteri> (:latest resta al rilascio). Alla fine, sempre,
# toglie immagini, contenitori, cache e builder di questa esecuzione, poi le immagini senza nome e la
# cache di costruzione penzolante non usata da 24 ore di tutti i progetti del demone.
# Verification: at every push on any branch (tags are taken by rilascio.yml) and by hand (Actions ▸ verifica ▸ Esegui).
# Its four jobs are the checks required to merge into main (docs/processo.md):
# controlli script syntax, workflows in block YAML and without actions, conflict markers, version, projects of
# the solution, JSON; secrets in the whole history with gitleaks (version and hash pinned);
# prove build of the whole solution with warnings as errors and all the tests of tests/Febe.Tests (never
# «dotnet test» on the whole solution: tests/Febe.Tests.Windows runs only on Windows) with real
# Chromium and Xvfb in a Debian 13 container: no test may be skipped, except the «da fare» ones of
# H264ConformanceTests.FeaturesStillToDo (riepilogo-prove.sh counts them apart).
# The synthetic world of the test site has seed 13 and, for the SitoDiProva category, also the seed of
# this run, written in the log to reproduce a failure;
# installatore Febe-Setup-<versione>-ci.<numero>.exe (our own installer, src/Febe.Installer) and the portable zip;
# only the .NET SDK is needed;
# immagine after the installer: the Docker image built with buildx, tested without network (start, health,
# Chromium, it_IT) and scanned with Trivy (it stops for a CRITICAL with a fix); only after a push on
# main it publishes it as :main and :sha-<7 characters> (:latest is left to the release). At the end,
# always, it removes this run's images, containers, cache and builder, then the unnamed images and the
# dangling build cache unused for 24 hours of all the daemon's projects.
#
# Niente azioni (decisione di Alberto del 18 novembre 2026: niente componenti esterni): ogni passo è un comando. I
# sorgenti arrivano con git e il gettone del lavoro, l'SDK .NET con .gitea/scripts/dotnet.sh (verificato con l'impronta
# dei metadati di Microsoft), il builder buildx con costruisci-immagine.sh builder. Gli artefatti (risultati delle
# prove, installatore e zip, rapporti di gitleaks e di Trivy) vanno nel registro dei pacchetti di Gitea, pacchetto
# generico febe-ci, versione <versione>-ci.<numero>, con REGISTRY_TOKEN (.gitea/scripts/artefatti.sh); la pulizia del
# lunedì toglie quelli di più di 14 giorni. Senza il segreto un avviso, e il lavoro resta verde. Nessun passo usa Node.
# No actions (decision of Alberto of 18 November 2026: no external components): every step is a command. The sources
# arrive with git and the job token, the .NET SDK with .gitea/scripts/dotnet.sh (verified against the hash in
# Microsoft's metadata), the buildx builder with costruisci-immagine.sh builder. The artifacts (test results,
# installer and zip, gitleaks and Trivy reports) go to Gitea's package registry, generic package febe-ci, version
# <versione>-ci.<numero>, with REGISTRY_TOKEN (.gitea/scripts/artefatti.sh); the Monday cleanup removes those older
# than 14 days. Without the secret a warning, and the job stays green. No step uses Node.
#
# Niente «pull_request»: in Gitea una richiesta di unione mostra lo stato del suo ultimo commit, che il push del ramo
# ha già verificato; pull_request rifarebbe tutto sullo stesso commit (refs/pull/N/head) sull'unico runner.
# Runner: act_runner con l'etichetta ubuntu-latest, un lavoro alla volta. I lavori parlano con il demone Docker del
# server, lo stesso di Encelado, Mimante e degli altri progetti: niente montaggi della cartella del lavoro in altri
# contenitori (sul server i percorsi sono diversi); le immagini passano come archivi e contesti di costruzione.
# Che cosa di Gitea 28 si usa e perché: docs/decisioni.md (20 ottobre e 18 novembre 2026) e docs/processo.md.
# No «pull_request»: in Gitea a pull request shows the status of its last commit, which the branch push has already
# verified; pull_request would redo everything on the same commit (refs/pull/N/head) on the only runner.
# Runner: act_runner with the ubuntu-latest label, one job at a time. The jobs talk to the server's Docker daemon, the
# same as Encelado, Mimante and the other projects: no mounts of the job folder into other containers (on the server
# the paths are different); images travel as archives and build contexts.
# What of Gitea 28 is used and why: docs/decisioni.md (20 October and 18 November 2026) and docs/processo.md.
name: verifica
on:
@@ -44,10 +44,10 @@ on:
permissions:
contents: read
# Su un ramo conta l'ultimo push: l'esecuzione precedente si annulla. Su main ogni commit ha il suo gruppo, così ogni
# unione arriva fino in fondo e pubblica la sua :sha-. L'evento fa parte del gruppo: un'esecuzione a mano non annulla
# mai quella di un push, che è l'unica a scrivere gli stati del commit richiesti per unire (un lavoro annullato lascia
# lo stato «failure», e workflow_dispatch non ne scrive).
# On a branch the last push counts: the earlier run is cancelled. On main every commit has its own group, so every
# merge runs to the end and publishes its :sha-. The event is part of the group: a run by hand never cancels the one
# of a push, which is the only one that writes the commit statuses required to merge (a cancelled job leaves the
# «failure» status, and workflow_dispatch writes none).
concurrency:
group: verifica-${{ gitea.event_name }}-${{ gitea.ref }}${{ gitea.ref == 'refs/heads/main' && format('-{0}', gitea.sha) || '' }}
cancel-in-progress: ${{ gitea.ref != 'refs/heads/main' }}
@@ -68,9 +68,9 @@ jobs:
env:
NUMERO: ${{ gitea.run_number }}
steps:
# I sorgenti del commit con git e il gettone del lavoro, che vale solo finché il lavoro gira e non resta nella
# configurazione del repository. Qui tutta la storia (PROFONDITA 0): gitleaks legge ogni commit da cui discende
# quello verificato. Lo stesso passo, lettera per lettera, apre ogni lavoro (lo controlla PipelineTests).
# The commit's sources with git and the job token, which is valid only while the job runs and does not stay in
# the repository configuration. Here the whole history (PROFONDITA 0): gitleaks reads every commit the verified
# one descends from. The same step, letter for letter, opens every job (PipelineTests checks it).
- name: Sorgenti
env:
TOKEN: ${{ gitea.token }}
@@ -112,9 +112,9 @@ jobs:
needs: controlli
runs-on: ubuntu-latest
timeout-minutes: 60
# Debian 13, nient'altro: Chromium vero della distribuzione, come nell'immagine di Febe (su Ubuntu è uno snap). Senza
# azioni non serve Node: git e curl prima dei sorgenti, il resto da ambiente-prove.sh, l'SDK da dotnet.sh.
# Memoria condivisa più ampia dei 64 MB predefiniti: le prove dell'interfaccia usano un Chromium senza finestra.
# Debian 13, nothing else: the distribution's real Chromium, as in the Febe image (on Ubuntu it is a snap). Without
# actions Node is not needed: git and curl before the sources, the rest from ambiente-prove.sh, the SDK from
# dotnet.sh. Shared memory larger than the default 64 MB: the interface tests use a Chromium without a window.
container:
image: debian:trixie
options: --shm-size=1g
@@ -151,7 +151,7 @@ jobs:
git checkout -q --force --detach "$GITHUB_SHA"
git log -1 --format='Commit %h: %s'
# Prima di tutto il resto, così un seme chiesto a mano e sbagliato ferma subito il lavoro.
# Before everything else, so that a wrong seed asked by hand stops the job at once.
- name: Semi del mondo sintetico
id: semi
run: |
@@ -209,8 +209,8 @@ jobs:
timeout-minutes: 30
env:
NUMERO: ${{ gitea.run_number }}
# Questo lavoro gira sull'immagine del runner, che non garantisce ICU: pubblicare e impacchettare non ne hanno
# bisogno, quindi .NET va in globalizzazione invariante invece di fermarsi («Couldn't find a valid ICU package»).
# This job runs on the runner image, which does not guarantee ICU: publishing and packaging do not need it, so
# .NET goes into invariant globalization instead of stopping («Couldn't find a valid ICU package»).
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "true"
steps:
- name: Sorgenti
@@ -254,8 +254,8 @@ jobs:
((${#artefatti[@]} == 2)) || { echo "Servono il programma di installazione e lo zip portabile, non: ${artefatti[*]:-niente}." >&2; exit 1; }
bash .gitea/scripts/artefatti.sh verifica "${artefatti[@]}"
# Dopo l'installatore, non solo dopo le prove: :main e :sha- escono solo da un commit con tutta la verifica verde.
# Sull'unico runner i lavori vanno comunque uno alla volta, quindi la durata non cambia.
# After the installer, not only after the tests: :main and :sha- come only from a commit with the whole verification
# green. On the only runner the jobs go one at a time anyway, so the duration does not change.
immagine:
needs: [prove, installatore]
runs-on: ubuntu-latest
@@ -288,14 +288,13 @@ jobs:
git checkout -q --force --detach "$GITHUB_SHA"
git log -1 --format='Commit %h: %s'
# Ciò che un'esecuzione interrotta (annullata, scaduta) non ha potuto togliere, e un tentativo precedente di
# questa stessa esecuzione.
# What an interrupted run (cancelled, timed out) could not remove, and an earlier attempt of this same run.
- name: Resti di esecuzioni interrotte
run: |
bash .gitea/scripts/pulizia-docker.sh residui 90
bash .gitea/scripts/pulizia-docker.sh esecuzione "$ESECUZIONE"
# Registro: la variabile REGISTRY delle Actions, se c'è, altrimenti l'host dell'indirizzo del server (ROOT_URL).
# Registry: the REGISTRY variable of the Actions, if set, otherwise the host of the server address (ROOT_URL).
- name: Versione, registro e nomi
env:
REGISTRO_SCELTO: ${{ vars.REGISTRY }}
@@ -315,7 +314,7 @@ jobs:
} >> "$GITHUB_ENV"
echo "Immagine $V-ci.$NUMERO del commit ${GITHUB_SHA::12}, provata come $PROVA; registro $REGISTRY/$OWNER/febe"
# Un builder buildx di questa esecuzione (con la sua cache), che sa che il registro di casa risponde in HTTP.
# A buildx builder of this run (with its cache), which knows that the home registry answers in HTTP.
- name: Builder buildx dell'esecuzione
run: bash .gitea/scripts/costruisci-immagine.sh builder "$REGISTRY"
@@ -364,13 +363,13 @@ jobs:
REGISTRO_UTENTE: ${{ gitea.actor }}
GITEA_TOKEN: ${{ gitea.token }}
run: |
# Le credenziali le mette costruisci-immagine.sh pubblica in una configurazione del client solo sua, tolta
# alla fine: buildx le passa al builder, il demone non c'entra (e proverebbe HTTPS). Non si stampano mai.
# costruisci-immagine.sh pubblica puts the credentials in a client configuration of its own, removed at the
# end: buildx passes them to the builder, the daemon is not involved (and would try HTTPS). Never printed.
NOMI=("$IMAGE:sha-${GITHUB_SHA::7}")
# :main solo se main è ancora a questo commit: un'esecuzione arrivata in ritardo non lo riporta indietro.
# Il gettone del lavoro solo nell'ambiente di git, come per i sorgenti. Il passo gira con «bash -e -o
# pipefail»: senza «|| CIMA=""» un errore di ls-remote chiuderebbe il passo prima dell'avviso, e non
# uscirebbe nemmeno la :sha-.
# :main only if main is still at this commit: a run that arrives late does not move it back.
# The job token only in git's environment, as for the sources. The step runs with «bash -e -o
# pipefail»: without «|| CIMA=""» an ls-remote error would end the step before the warning, and not even
# the :sha- would come out.
INTESTAZIONE="Authorization: basic $(printf 'x-access-token:%s' "$GITEA_TOKEN" | base64 -w0)"
CIMA=$(GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=http.extraHeader GIT_CONFIG_VALUE_0="$INTESTAZIONE" \
git ls-remote origin refs/heads/main 2> /dev/null | cut -f1) || CIMA=""
@@ -386,10 +385,10 @@ jobs:
- name: Pulizia (sempre)
if: always()
run: |
# La configurazione del client con le credenziali, se un'interruzione ha saltato la trap di chi l'ha scritta.
# The client configuration with the credentials, if an interruption skipped the trap of whoever wrote it.
rm -rf "${RUNNER_TEMP:-/tmp}/febe-docker-$ESECUZIONE"
if [ -n "${ARCHIVIO:-}" ]; then rm -f "$ARCHIVIO"; fi
bash .gitea/scripts/pulizia-docker.sh esecuzione "$ESECUZIONE"
# Poi, per tutti i progetti del demone, ciò che nessuno usa: immagini senza nome e cache di costruzione
# penzolante non usata da 24 ore. Non fa mai fallire il lavoro.
# Then, for all the daemon's projects, what nobody uses: unnamed images and dangling build cache unused for
# 24 hours. It never fails the job.
bash .gitea/scripts/pulizia-docker.sh penzolanti || echo "::warning::La pulizia di ciò che nessuno usa non è riuscita."