CI: сборка прошивок на Gitea Actions (workflow, скрипт, раннер)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# act_runner для Gitea: выполняет Gitea Actions на этом сервере.
|
||||
#
|
||||
# Запуск (из каталога ci/act_runner):
|
||||
# 1) получить токен: Gitea → репозиторий → Settings → Actions → Runners → Create new Runner
|
||||
# 2) создать .env рядом с этим файлом:
|
||||
# GITEA_INSTANCE_URL=https://git.meshinfo.ru
|
||||
# GITEA_RUNNER_REGISTRATION_TOKEN=<токен из шага 1>
|
||||
# GITEA_RUNNER_NAME=meshcore-builder
|
||||
# 3) docker compose up -d
|
||||
# 4) проверить: docker compose logs -f
|
||||
#
|
||||
# Метка ubuntu-latest должна совпадать с runs-on в .gitea/workflows/firmware.yml.
|
||||
# Образ job'а — catthehacker/ubuntu:act-22.04: в нём уже есть git, curl, python3,
|
||||
# build-essential; PlatformIO ставится шагом workflow и живёт в кэше.
|
||||
|
||||
services:
|
||||
act-runner:
|
||||
image: gitea/act_runner:latest
|
||||
container_name: meshcore-act-runner
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
GITEA_INSTANCE_URL: ${GITEA_INSTANCE_URL:?укажите адрес Gitea в .env}
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN:?нужен токен раннера}
|
||||
GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME:-meshcore-builder}
|
||||
GITEA_RUNNER_LABELS: ${GITEA_RUNNER_LABELS:-ubuntu-latest:docker://catthehacker/ubuntu:act-22.04}
|
||||
CONFIG_FILE: /config.yaml
|
||||
volumes:
|
||||
# состояние раннера (.runner) и локальный кэш Gitea Actions
|
||||
- ./data:/data
|
||||
- ./config.yaml:/config.yaml:ro
|
||||
# job'ы запускаются как соседние контейнеры, поэтому нужен доступ к демону
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
Reference in New Issue
Block a user