diff --git a/.forgejo/template b/.forgejo/template index d3fe90a..0e1475e 100644 --- a/.forgejo/template +++ b/.forgejo/template @@ -1,6 +1,5 @@ package.json README.md .env.example -.forgejo/workflows/ci.yaml migrations/0001_init.sql package-lock.json diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index c0633fe..37bcc36 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -20,10 +20,10 @@ jobs: - uses: actions/checkout@v4 - uses: http://192.168.1.230:3000/nholtware/workflows/build-push@main with: - app-name: ${REPO_NAME} + app-name: ${{ github.event.repository.name }} registry-user: ${{ secrets.REGISTRY_USER }} registry-token: ${{ secrets.REGISTRY_TOKEN }} - uses: http://192.168.1.230:3000/nholtware/workflows/gitops-bump@main with: - app-name: ${REPO_NAME} + app-name: ${{ github.event.repository.name }} gitops-token: ${{ secrets.GITOPS_TOKEN }} diff --git a/README.md b/README.md index 7d6e2e8..05d9286 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Logs: one JSON object per line on stdout (`level,time,msg,service,version`, plus ## Using this template -1. **Generate** a repo from this template in Forgejo (public). The repo name is substituted into `package.json`, this README, `.env.example`, the CI workflow, and the first migration. +1. **Generate** a repo from this template in Forgejo (public). The repo name is substituted into `package.json`, this README, `.env.example`, and the first migration (CI derives the app name from the repo name itself). 2. **Set 3 Actions secrets** on the new repo: `REGISTRY_USER` (`nholtware`), `REGISTRY_TOKEN` (registry push token), `GITOPS_TOKEN` (ci-bot gitops token). 3. **Add gitops entries**: render `templates/backend/` (see its README) into `manifests//` and add `apps/.yaml` in `nholtware/gitops`. 4. **Push** to `main`. Generating a repo emits no push event, so CI only starts on your first push.