diff --git a/.gitea/workflows/hello.yml b/.gitea/workflows/hello.yml new file mode 100644 index 0000000..17fd558 --- /dev/null +++ b/.gitea/workflows/hello.yml @@ -0,0 +1,44 @@ +# ────────────────────────────────────────────────────────────────────────────── +# nome: mostrato nell'interfaccia Gitea nella sezione "Actions" +name: Hello CI + +# ────────────────────────────────────────────────────────────────────────────── +# on: definisce QUANDO questo workflow si attiva +on: + push: + branches: + - main + - master + +# ────────────────────────────────────────────────────────────────────────────── +# jobs: i lavori da eseguire (per default girano in parallelo) +jobs: + # Il nome del job è arbitrario — comparirà nell'interfaccia Gitea + informazioni: + runs-on: ubuntu-latest # Sistema operativo del Runner + + # steps: lista di passi SEQUENZIALI dentro il job + steps: + # Step 1: scarica il codice sorgente sul Runner + - name: Scarica il codice + uses: actions/checkout@v4 # Action della community — logica pre-confezionata + + # Step 2: mostra informazioni sul push usando i contesti ${{ }} + - name: Informazioni sul push + run: | + echo "==========================================" + echo "Repository: ${{ github.repository }}" + echo "Branch: ${{ github.ref_name }}" + echo "Autore: ${{ github.actor }}" + echo "Commit SHA: ${{ github.sha }}" + echo "Tipo evento: ${{ github.event_name }}" + echo "==========================================" + + # Step 3: conta i file nel repository + - name: Statistiche repository + run: | + echo "File nel repository:" + find . -type f -not -path './.git/*' | wc -l + echo "" + echo "Estensioni principali:" + find . -type f -not -path './.git/*' | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -10