mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
feat: Add GitLab sync (#2312)
* feat: Add GitLab sync * Add codeberg to sync script --------- Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
This commit is contained in:
parent
ae58aaff30
commit
6341640243
1 changed files with 30 additions and 0 deletions
30
.github/workflows/backup.yml
vendored
Normal file
30
.github/workflows/backup.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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@a6f90b1f127823b31d4d4a8d96047790581349bd #v0.9.1
|
||||
with:
|
||||
ssh-private-key: |
|
||||
${{ secrets.MIRROR_GITLAB_SYNC_KEY }}
|
||||
${{ secrets.MIRROR_CODEBERG_SYNC_KEY }}
|
||||
|
||||
- name: Add remotes & push
|
||||
run: |
|
||||
git remote add gitlab git@gitlab.com:goatcorp/Dalamud.git
|
||||
git push gitlab --all --force
|
||||
git remote add codeberg git@codeberg.org/goatcorp/Dalamud.git
|
||||
git push codeberg --all --force
|
||||
Loading…
Add table
Add a link
Reference in a new issue