From 83e30d2c3de9f1474343d9807d364a6e0fceb07c Mon Sep 17 00:00:00 2001 From: Bausager Date: Mon, 6 Oct 2025 21:31:38 +0200 Subject: [PATCH] Update .gitea/workflows/sync-public.yml --- .gitea/workflows/sync-public.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.gitea/workflows/sync-public.yml b/.gitea/workflows/sync-public.yml index 1a8081e..c76e7b4 100644 --- a/.gitea/workflows/sync-public.yml +++ b/.gitea/workflows/sync-public.yml @@ -1,3 +1,38 @@ +name: Sync public mirror + +on: + push: + branches: [ main ] # change if your default branch is different + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Install tools (rsync) + run: | + sudo apt-get update && sudo apt-get install -y rsync + + - name: Checkout private repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Prepare SSH + env: + SSH_KEY: ${{ secrets.PUBLIC_REPO_SSH_KEY }} + run: | + set -euo pipefail + mkdir -p ~/.ssh + echo "$SSH_KEY" > ~/.ssh/id_sync + chmod 600 ~/.ssh/id_sync + printf 'Host 192.168.1.15\n HostName 192.168.1.15\n Port 22\n User git\n IdentityFile ~/.ssh/id_sync\n IdentitiesOnly yes\n' >> ~/.ssh/config + ssh-keyscan -p 22 192.168.1.15 >> ~/.ssh/known_hosts + + - name: Clone public repo + run: | + git clone --depth 1 ssh://git@192.168.1.15:22/Bausager/Flux-oss.git /tmp/public + - name: Sync files using .gitea/workflows/oss-keep.txt run: | set -euo pipefail