Il progetto adotta il nome «Rail Enterprise» ovunque (codice RailEnterprise.*, variabili RE_*, intestazioni RESV/RECL, immagine rail-enterprise-server) per allinearsi al repository Gitea. Aggiunge Gitea Actions sul modello di Chronos: CI su PR e main, rilascio da tag con gioco Windows (client Godot + server in server/), server Windows/Linux e immagine Docker nel registro Gitea, nightly. Aggiunge i riferimenti visivi 06–09, i modelli di PR e issue, l'ADR 0014 e aggiorna README (comandi locali), STATE e CLAUDE.md. 120 test verdi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
name: Immagine nightly
|
|
|
|
# L'immagine del server di main come :nightly nel registro container di Gitea (ADR 0014). Mai una release.
|
|
on:
|
|
schedule:
|
|
- cron: "37 2 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
env:
|
|
PUBLIC_URL: ${{ vars.PUBLIC_URL || 'https://gitea.encke-hake.ts.net' }}
|
|
|
|
jobs:
|
|
nightly:
|
|
if: github.ref == 'refs/heads/main'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
env:
|
|
TOKEN: ${{ github.token }}
|
|
run: |
|
|
git config --global --add safe.directory "$PWD"
|
|
git init -q .
|
|
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
|
|
git -c http.extraheader="Authorization: basic $(printf 'x-access-token:%s' "$TOKEN" | base64 -w0)" fetch -q --depth=1 origin "${{ github.sha }}"
|
|
git checkout -q FETCH_HEAD
|
|
|
|
- name: Accesso al registro
|
|
env:
|
|
REGISTRY: ${{ vars.REGISTRY }}
|
|
USER: ${{ vars.REGISTRY_USER || github.actor }}
|
|
TOKEN: ${{ secrets.REGISTRY_TOKEN || github.token }}
|
|
run: |
|
|
registry="${REGISTRY:-$(printf '%s' "$PUBLIC_URL" | sed -E 's#^[a-z]+://##; s#/.*$##')}"
|
|
owner="$(printf '%s' "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
|
|
{ echo "REGISTRY_HOST=$registry"; echo "IMAGE=$registry/$owner/rail-enterprise-server"; } >> "$GITHUB_ENV"
|
|
if ! printf '%s' "$TOKEN" | docker login "$registry" -u "$USER" --password-stdin; then
|
|
echo "::error title=Registro::Accesso a $registry rifiutato: serve il segreto REGISTRY_TOKEN."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build e push
|
|
run: |
|
|
docker build -f docker/Dockerfile --build-arg RE_VERSION="0.0.0-nightly.${{ github.run_number }}" -t "$IMAGE:nightly" .
|
|
docker push "$IMAGE:nightly"
|
|
|
|
- name: Pulizia
|
|
if: always()
|
|
run: |
|
|
docker image rm "$IMAGE:nightly" 2> /dev/null || true
|
|
docker logout "$REGISTRY_HOST" || true
|