diff --git a/README.md b/README.md index e69de29..42fdd6c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,48 @@ +# Gitea Actions CI -kirjasto + +Reusable workflow -kirjasto Gitea Actionsille. Lisätietoja: [docs/](docs/) + +## Gitea Actions runner (K8s / Helm) + +Act runner suorittaa Gitea Actions workflowt. Asennus Kubernetes-klusteriin Helm chartilla: + +### 1. Rekisteröintitoken + +Hae token Giteasta: +- **Organization-taso:** Org → Settings → Actions → Runners → Create new runner +- **Globaali (site admin):** Site Admin → Actions → Runners → Create new runner + +Token on kertakäyttöinen — käytä heti. + +### 2. Asenna runner + +```bash +GITEA_URL="https://" +GITEA_ACTIONS_TOKEN="" +GITEA_ACTIONS_NAMESPACE="gitea-actions" + +helm repo add gitea https://dl.gitea.com/charts +helm repo update +helm upgrade --install act-runner gitea/gitea-act-runner \ + --set gitea.url="$GITEA_URL" \ + --set gitea.token="$GITEA_ACTIONS_TOKEN" \ + --namespace "$GITEA_ACTIONS_NAMESPACE" \ + --create-namespace +``` + +### 3. Varmista + +```bash +kubectl get pods -n gitea-actions +# → act-runner-xxx Running +``` + +Tämän jälkeen `.gitea/workflows/ci.yml` triggeröityy automaattisesti pushista. + +### Muuta + +| Muuttuja | Kuvaus | +|----------|--------| +| `gitea.url` | Gitea-palvelimen osoite (esim. `https://gitea.example.com`) | +| `gitea.token` | Rekisteröintitoken (kts. kohta 1) | +| `runner.labels` | Mukautetut labelit (oletus: `ubuntu-latest`) |