2.7 KiB
2.7 KiB
Setup Runner Forgejo — passo-a-passo (5 min)
Token já foi gerado no admin do Forgejo: t6yTf9Fu7ana95Y7CynCi4edGCWj6fT8wJQkdnDP
(Se precisar de novo, ir em https://git.pontualtech.work/admin/actions/runners → "Criar novo Runner")
1. Subir runner no Coolify
- Abra https://painel.pontualtech.work
- Pontualtech →
+ Add Resource→ Docker Compose Empty - Selecione localhost (NÃO Servidor Imprimitech)
- No campo "Docker Compose" cole:
services:
forgejo-runner:
image: code.forgejo.org/forgejo/runner:6
restart: unless-stopped
environment:
FORGEJO_INSTANCE_URL: https://git.pontualtech.work
FORGEJO_RUNNER_REGISTRATION_TOKEN: t6yTf9Fu7ana95Y7CynCi4edGCWj6fT8wJQkdnDP
FORGEJO_RUNNER_NAME: shivao-runner
FORGEJO_RUNNER_LABELS: ubuntu-latest,docker
volumes:
- runner_data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks: [coolify]
volumes:
runner_data:
networks:
coolify:
external: true
- Save + Deploy
- Aguarde ~30s. Confira em https://git.pontualtech.work/admin/actions/runners — deve aparecer "shivao-runner" online
2. Configurar secrets no repo Shivão
Em https://git.pontualtech.work/karlao/shivao-projeto → Settings → Actions → Secrets
Adicione 3 secrets:
SHIVAO_KEYSTORE_BASE64
# Rode no Git Bash:
base64 -w0 ~/Downloads/Shivao-keystore-backup/shivao-release-CAPACITOR.keystore | clip
# Cola o conteúdo (já vai pro clipboard)
SHIVAO_KEYSTORE_PWD
Valor: ShivaoKeystore2026!
FORGEJO_TOKEN
Em https://git.pontualtech.work/user/settings/applications → Generate New Token
- Token name:
actions-shivao - Scopes: marque write:repository
- Generate → cole o token gerado neste secret
3. Testar workflow
Depois dos secrets configurados:
- Em Actions do repo (https://git.pontualtech.work/karlao/shivao-projeto/actions), o workflow
Build Android (APK + AAB)deve aparecer - Botão Run workflow → branch master → Run
- Build automático deve iniciar (download SDK + JDK + npm install + gradle bundleRelease + assembleRelease + upload artifacts)
A partir daí, qualquer push em app/, mobile/ ou scripts/sync-html.mjs dispara build automático no servidor — você não precisa mais buildar local.
Troubleshooting
- Runner não aparece online: verificar logs do container no Coolify (Logs tab). Token expirado = gerar novo no admin.
/var/run/docker.sock not found: o Coolify tem o socket mountado por padrão, mas se der erro adicioneprivileged: trueao service.- Build falha em
cap sync: runner não tem suficiente RAM. Ajustar limit no Coolify (Resource Limits → 2GB RAM mínimo).