CICD-049 · Check Gitea access from a job
Encyclopedia · Gitea runner fundamentals · All snippets
Previous · CICD-048 · Next · CICD-050
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites Gitea Actions enabled, authorized trusted runner registered and local repository checked out when needed.
- Platforms gitea-actions.
- Parameters
GITEA_URL.
2. Copy the snippet
bash
curl -fsS --max-time 5 "${GITEA_URL:?}/api/v1/version" | jq -e '.version'3. How it works
This request tests the Gitea route from the job's network namespace. jq checks that the response contains a version so an unrelated HTML page cannot satisfy the test.
4. Verify the result
Use the URL reachable from the actual job container rather than 127.0.0.1 on the host.
Validation syntax-validated (Bash parse). Status definitions.