5c94564c9f
로컬 워크스페이스에서 Gitea Actions를 검증·디스패치할 수 있는 GITEA_TOKEN_HOME API 토큰 계약과, Synology에서 act_runner를 기동하는 스크립트를 추가한다. - validate_gitea_token_home_v1.py: 저장소 메타데이터 조회, 워크플로 접근 확인, workflow_dispatch 트리거 + 최신 실행 결과 폴링 - start_act_runner_synology.sh: Synology 환경에서 act_runner 기동 - setup_act_runner.sh: 기동 절차 갱신
44 lines
1.2 KiB
Markdown
44 lines
1.2 KiB
Markdown
# GITEA_TOKEN_HOME
|
|
|
|
`GITEA_TOKEN_HOME` is the local API token used to validate and optionally dispatch Gitea Actions from this workspace.
|
|
|
|
## Purpose
|
|
|
|
- Read repository metadata
|
|
- Confirm workflow access
|
|
- Optionally trigger a workflow dispatch
|
|
- Poll the latest run for evidence
|
|
|
|
## Harness
|
|
|
|
Use:
|
|
|
|
```bash
|
|
python tools/validate_gitea_token_home_v1.py
|
|
```
|
|
|
|
To dispatch the KIS collector workflow as a smoke test:
|
|
|
|
```bash
|
|
python tools/validate_gitea_token_home_v1.py --dispatch --workflow kis_data_collection.yml --ref main
|
|
```
|
|
|
|
## Expected behavior
|
|
|
|
- Without `GITEA_TOKEN_HOME`, the harness exits with `GITEA_TOKEN_HOME missing or empty`.
|
|
- With a valid token, the harness should return `gate: PASS`.
|
|
- With `--dispatch`, the harness posts a workflow dispatch and reports the latest run evidence.
|
|
|
|
## Security notes
|
|
|
|
- Do not print the token value.
|
|
- Do not commit the token into repo files.
|
|
- Treat the token as a repo-scoped write credential.
|
|
|
|
## Troubleshooting
|
|
|
|
- `401 Unauthorized`: token is missing, expired, or scoped to the wrong repository.
|
|
- `404 Not Found`: repo path or workflow filename is wrong.
|
|
- `latest_run_missing`: dispatch succeeded, but the workflow run did not appear in time; increase `--wait-seconds`.
|
|
|