Add a .gitea/workflows/ job in this repo that keeps the Act runner checkout in sync with master. When a commit lands on master (direct push or merged PR), the workflow should git pull the latest into ~/Documents/repos/server-infra on ai-server-4080 (the Gitea Act runner / control node).
Today the runner relies on a manual checkout at that path (see IMPLEMENTATION.md — runner requirements). CI deploy jobs will drift if inventory, playbooks, or scripts change on master but the runner copy is stale.
Motivation
deploy-apps.yml and future CI deploy steps read playbooks + inventory from the local checkout.
Changes merged to server-infra should be picked up automatically without SSH-ing to ai-server-4080 to pull by hand.
Self-sync on merge avoids chicken-and-egg: this workflow lives in the repo it updates.
Adjust event context keys to Gitea Actions equivalents if they differ from GitHub (github.* vs gitea.*).
Acceptance criteria
Workflow file added under .gitea/workflows/
Runs on push to master and on merged PRs targeting master
Executes only on the ai-server-4080 Act runner (not app hosts)
Updates ~/Documents/repos/server-infra to the triggering commit (fast-forward pull)
Fails loudly if the working tree is dirty or pull is not fast-forward (no silent overwrite of local changes)
Documented briefly in IMPLEMENTATION.md (Gitea Act Runner section or Implementation Order table)
Notes
Checkout path must match control-node layout: ~/Documents/repos/server-infra (same as Ansible install / galaxy steps in docs).
Runner user needs read access to this repo (deploy key at gitea_key_path on ai-server-4080 may already cover this).
This is sync only — not a full deploy. App deploy via deploy-apps.yml remains a separate workflow/ticket (#9 in implementation order).
Consider git pull --ff-only to avoid merge commits on the runner.
Related
IMPLEMENTATION.md — Gitea Act Runner, Phase 2 CI Deploy
Implementation order item 9: stub deploy-apps.yml + app repo workflows
## Summary
Add a `.gitea/workflows/` job in this repo that keeps the Act runner checkout in sync with `master`. When a commit lands on `master` (direct push or merged PR), the workflow should `git pull` the latest into `~/Documents/repos/server-infra` on **ai-server-4080** (the Gitea Act runner / control node).
Today the runner relies on a manual checkout at that path (see `IMPLEMENTATION.md` — runner requirements). CI deploy jobs will drift if inventory, playbooks, or scripts change on `master` but the runner copy is stale.
## Motivation
- `deploy-apps.yml` and future CI deploy steps read playbooks + inventory from the local checkout.
- Changes merged to `server-infra` should be picked up automatically without SSH-ing to ai-server-4080 to pull by hand.
- Self-sync on merge avoids chicken-and-egg: this workflow lives in the repo it updates.
## Proposed workflow
**File:** `.gitea/workflows/sync-checkout.yml` (name flexible)
**Triggers:**
- `push` to `master`
- `pull_request` closed + merged into `master` (optional redundancy; push on merge may suffice)
**Runner:** self-hosted Act runner on ai-server-4080 (`runs-on: self-hosted` or org-specific label — match however the runner is registered).
**Steps (sketch):**
```yaml
name: Sync runner checkout
on:
push:
branches: [master]
pull_request:
types: [closed]
branches: [master]
jobs:
sync:
if: github.event_name == 'push' || github.event.pull_request.merged == true
runs-on: self-hosted
steps:
- name: Pull latest server-infra
run: |
cd ~/Documents/repos/server-infra
git fetch origin master
git checkout master
git pull --ff-only origin master
```
Adjust event context keys to Gitea Actions equivalents if they differ from GitHub (`github.*` vs `gitea.*`).
## Acceptance criteria
- [ ] Workflow file added under `.gitea/workflows/`
- [ ] Runs on push to `master` and on merged PRs targeting `master`
- [ ] Executes only on the ai-server-4080 Act runner (not app hosts)
- [ ] Updates `~/Documents/repos/server-infra` to the triggering commit (fast-forward pull)
- [ ] Fails loudly if the working tree is dirty or pull is not fast-forward (no silent overwrite of local changes)
- [ ] Documented briefly in `IMPLEMENTATION.md` (Gitea Act Runner section or Implementation Order table)
## Notes
- Checkout path must match control-node layout: `~/Documents/repos/server-infra` (same as Ansible install / galaxy steps in docs).
- Runner user needs read access to this repo (deploy key at `gitea_key_path` on ai-server-4080 may already cover this).
- This is **sync only** — not a full deploy. App deploy via `deploy-apps.yml` remains a separate workflow/ticket (#9 in implementation order).
- Consider `git pull --ff-only` to avoid merge commits on the runner.
## Related
- `IMPLEMENTATION.md` — Gitea Act Runner, Phase 2 CI Deploy
- Implementation order item 9: stub `deploy-apps.yml` + app repo workflows
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Add a
.gitea/workflows/job in this repo that keeps the Act runner checkout in sync withmaster. When a commit lands onmaster(direct push or merged PR), the workflow shouldgit pullthe latest into~/Documents/repos/server-infraon ai-server-4080 (the Gitea Act runner / control node).Today the runner relies on a manual checkout at that path (see
IMPLEMENTATION.md— runner requirements). CI deploy jobs will drift if inventory, playbooks, or scripts change onmasterbut the runner copy is stale.Motivation
deploy-apps.ymland future CI deploy steps read playbooks + inventory from the local checkout.server-infrashould be picked up automatically without SSH-ing to ai-server-4080 to pull by hand.Proposed workflow
File:
.gitea/workflows/sync-checkout.yml(name flexible)Triggers:
pushtomasterpull_requestclosed + merged intomaster(optional redundancy; push on merge may suffice)Runner: self-hosted Act runner on ai-server-4080 (
runs-on: self-hostedor org-specific label — match however the runner is registered).Steps (sketch):
Adjust event context keys to Gitea Actions equivalents if they differ from GitHub (
github.*vsgitea.*).Acceptance criteria
.gitea/workflows/masterand on merged PRs targetingmaster~/Documents/repos/server-infrato the triggering commit (fast-forward pull)IMPLEMENTATION.md(Gitea Act Runner section or Implementation Order table)Notes
~/Documents/repos/server-infra(same as Ansible install / galaxy steps in docs).gitea_key_pathon ai-server-4080 may already cover this).deploy-apps.ymlremains a separate workflow/ticket (#9 in implementation order).git pull --ff-onlyto avoid merge commits on the runner.Related
IMPLEMENTATION.md— Gitea Act Runner, Phase 2 CI Deploydeploy-apps.yml+ app repo workflows