2c09b5c349c101cbafb146bb01c8bb81bbce67b6
Gitea Actions
Repository contenente action Gitea Actions centralizzate utilizzabili da altri repository del workspace.
Action disponibili
version-from-tag
Estrae la versione da un tag (formato v1.2.3.4[-suffix]) e produce le variabili
appver, fullver, suffix e version.
- name: Calcola versione
uses: https://<host>/<owner>/Actions/version-from-tag@<ref>
with:
ref-name: ${{ github.ref_name }}
publish-dotnet
Compila (restore + publish) un progetto .NET e sincronizza l'output su un path
locale via rsync.
- name: Publish
uses: https://<host>/<owner>/Actions/publish-dotnet@<ref>
with:
project: src/MyApp/MyApp.csproj
output-path: /var/publish/myapp
version: ${{ steps.versione.outputs.appver }}
# opzionali:
configuration: Release
subpath: "wwwroot"
exclude-dirs: store
exclude-files: appsettings.json
deploy-iis
Esegue il deploy su IIS: ferma sito/application pool, copia i file via robocopy,
riavvia i servizi.
- name: Deploy IIS
uses: https://<host>/<owner>/Actions/deploy-iis@<ref>
with:
source-path: /var/publish/myapp
destination-path: C:\inetpub\wwwroot\myapp
site-name: MySite
app-pool-name: MyAppPool
exclude-dirs: store
exclude-files: appsettings.json
Versionamento delle action
Per puntare a una versione stabile, crea un tag su questo repository
(es. v1.0.0) e usalo nel riferimento:
uses: https://<host>/<owner>/Actions/publish-dotnet@v1.0.0
Oppure punta a un branch (@main) per avere sempre l'ultima versione.
Description
v1.0.1
Latest
Languages
Markdown
100%