From cdcfb4e5b479b663ef12cf29f82c446428be4bb2 Mon Sep 17 00:00:00 2001 From: KazWolfe Date: Mon, 7 Jul 2025 09:55:21 -0700 Subject: [PATCH] feat: Add GitLab sync --- .github/workflows/backup.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/backup.yml diff --git a/.github/workflows/backup.yml b/.github/workflows/backup.yml new file mode 100644 index 000000000..354f618f5 --- /dev/null +++ b/.github/workflows/backup.yml @@ -0,0 +1,26 @@ +name: Back up code to GitLab and other sources + +on: + schedule: + - cron: '0 2 * * *' # Run every day at 2 AM + workflow_dispatch: # Allow manual trigger + +jobs: + push-to-gitlab: + runs-on: ubuntu-latest + if: github.repository == 'goatcorp/Dalamud' + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.GITLAB_SYNC_KEY }} + + - name: Add remote & push + run: | + git remote add gitlab git@gitlab.com:goatcorp/Dalamud.git + git push gitlab --all --force