feat(examples): aggiungi template documentazione Nuxt 4
- ci.yml: quality-gates condivisi con paths-ignore su content/** - release.yml: docker-release + auto-release con needs - maintenance.yml: schedule martedì 02:00 audit, 1° mese 03:00 outdated refs #1 @25m
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
# Copia in: .gitea/workflows/ci.yml
|
||||||
|
# Usato da: siti documentazione Nuxt 4 con SSR e Docker
|
||||||
|
#
|
||||||
|
# Prerequisiti:
|
||||||
|
# - package.json con script: lint:check, typecheck, format:check, build, test
|
||||||
|
# - Secrets: NPM_TOKEN (accesso registry @pzeta privato)
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'content/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality-gates:
|
||||||
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/quality-gates.yml@v1
|
||||||
|
secrets: inherit
|
||||||
|
# with:
|
||||||
|
# node-version: '22.17' # opzionale, default già impostato
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# Copia in: .gitea/workflows/maintenance.yml
|
||||||
|
# Trigger:
|
||||||
|
# - PR merged → cleanup branch sorgente
|
||||||
|
# - Ogni martedì 02:00 → security audit vulnerabilità (settimanale)
|
||||||
|
# - Ogni 1° del mese → controllo pacchetti obsoleti (mensile)
|
||||||
|
# - Manuale → workflow_dispatch (esegue tutti i job di manutenzione)
|
||||||
|
|
||||||
|
name: Maintenance
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * 2' # ogni martedì alle 02:00 → security audit
|
||||||
|
- cron: '0 3 1 * *' # ogni 1° del mese alle 03:00 → outdated check
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
branch-cleanup:
|
||||||
|
if: gitea.event_name == 'pull_request' && gitea.event.pull_request.merged == true
|
||||||
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/branch-cleanup.yml@v1
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
dependency-audit:
|
||||||
|
if: >
|
||||||
|
gitea.event_name == 'workflow_dispatch' ||
|
||||||
|
(gitea.event_name == 'schedule' && gitea.event.schedule == '0 2 * * 2')
|
||||||
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/dependency-check.yml@v1
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
dependency-outdated:
|
||||||
|
if: >
|
||||||
|
gitea.event_name == 'workflow_dispatch' ||
|
||||||
|
(gitea.event_name == 'schedule' && gitea.event.schedule == '0 3 1 * *')
|
||||||
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/dependency-outdated.yml@v1
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Copia in: .gitea/workflows/release.yml
|
||||||
|
# Trigger: git tag v* → build Docker + crea release Gitea
|
||||||
|
#
|
||||||
|
# NOTA: auto-release attende docker-release via needs.
|
||||||
|
# Workaround Gitea bug #31900: token esplicito nel checkout di auto-release.yml.
|
||||||
|
#
|
||||||
|
# Secrets richiesti nel repository consumer:
|
||||||
|
# NPM_TOKEN — accesso registry @pzeta (npm install + Docker secret)
|
||||||
|
# G_USER — username Docker registry Gitea
|
||||||
|
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-release:
|
||||||
|
runs-on: catthehacker-latest # workaround Gitea bug #34986: runs-on non rispettato in workflow_call
|
||||||
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/docker-release.yml@v1
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
runner: catthehacker-latest # runner con Docker pre-installato
|
||||||
|
|
||||||
|
auto-release:
|
||||||
|
needs: [docker-release]
|
||||||
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/auto-release.yml@v1
|
||||||
|
secrets: inherit
|
||||||
Reference in New Issue
Block a user