commit f2667be4af8489d39b98df79b47f133952b9336f Author: Gitea Admin Date: Thu Aug 6 12:26:30 2026 -0300 demo: gitea actions PoC diff --git a/.gitea/workflows/demo.yml b/.gitea/workflows/demo.yml new file mode 100644 index 0000000..60910ae --- /dev/null +++ b/.gitea/workflows/demo.yml @@ -0,0 +1,16 @@ +name: Demo +on: [push] + +jobs: + hello: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: System info + run: | + echo "Hello from Gitea Actions on OKE" + uname -a + + - name: Run app + run: python3 app.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..f39c356 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Gitea Actions demo + +A minimal repository that runs a Gitea Actions workflow on the in-cluster runner. + +## Prerequisites + +- Gitea deployed and reachable (VPN required): `https://gitea.stg.dadosfera.ai` +- The act_runner registered and **Idle** (Site Administration → Actions → Runners) — see the root README runbook. + +## Walkthrough + +1. Log in at `https://gitea.stg.dadosfera.ai` with the admin credentials from AWS Secrets Manager (`stg/gitea/admin`). + +2. Create a repository, e.g. `demo` (under your user or a new org). Leave "Initialize repository" unchecked. + +3. Push this directory's content to it (HTTPS only — SSH is disabled on this instance): + + ```bash + cd examples/demo-repo + git init -b main + git add . + git commit -m "demo" + git remote add gitea https://gitea.stg.dadosfera.ai//demo.git + git push gitea main + # authenticate with the admin username + password, or an application token + # (Settings → Applications → Generate New Token) + ``` + +4. Open the repo's **Actions** tab in Gitea. The `Demo` workflow should be running; it checks out the code, prints system info, and runs `app.py`. Green check = the PoC loop is closed. + +## How it resolves + +- `runs-on: ubuntu-latest` maps to the runner label `ubuntu-latest:docker://gitea/runner-images:ubuntu-latest` — the job runs in that image inside the runner pod's docker-in-docker sidecar. +- `actions/checkout@v4` is fetched from GitHub because the instance sets `DEFAULT_ACTIONS_URL: github` (cluster nodes need outbound internet). diff --git a/app.py b/app.py new file mode 100644 index 0000000..f94d56a --- /dev/null +++ b/app.py @@ -0,0 +1 @@ +print("gitea actions demo ok")