mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
feat(ci): GitHub→Forgejo mirror + Forgejo CD pulls from forgejo remote
- .github/workflows/mirror-to-forgejo.yml: on push to main, runner on Mac Mini
pushes to Forgejo via local SSH (localhost:2222). Keeps Forgejo in sync.
- .forgejo/workflows/cd-macmini.yml: deploy step now pulls from forgejo remote
(ssh://localhost:2222) instead of GitHub origin.
Flow: local → git push origin main → GitHub → mirror-to-forgejo runs on Mac Mini
→ pushes to Forgejo → Forgejo CD pipeline → deploys containers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
abb7712749
commit
0968c84eb4
2 changed files with 30 additions and 1 deletions
28
.github/workflows/mirror-to-forgejo.yml
vendored
Normal file
28
.github/workflows/mirror-to-forgejo.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Mirror GitHub → Forgejo on every push to main
|
||||
# Keeps Forgejo in sync so it can serve as the deployment source.
|
||||
#
|
||||
# Requires GitHub secret:
|
||||
# FORGEJO_DEPLOY_KEY — private SSH key matching mac-mini-deploy key in Forgejo
|
||||
# (key fingerprint: SHA256:baNsV+pq28d1vSWX+jtqyV0GqRnjUcHfDZM8RopcGDE)
|
||||
|
||||
name: Mirror to Forgejo
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
name: Push to Forgejo
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Mirror to Forgejo via SSH
|
||||
run: |
|
||||
cd /Users/mana/projects/manacore-monorepo
|
||||
|
||||
git pull origin main
|
||||
|
||||
# Push to Forgejo via localhost SSH (runner is on the Mac Mini)
|
||||
GIT_SSH_COMMAND='ssh -p 2222 -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no' \
|
||||
git push ssh://git@localhost:2222/till/manacore-monorepo.git main 2>&1
|
||||
echo "Mirrored to Forgejo"
|
||||
Loading…
Add table
Add a link
Reference in a new issue