diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 00000000..6d41059d --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,37 @@ +name: GitLab'a Yedekle + +on: + push: + branches: + - '*' + delete: + branches: + - '*' + +# GitHub'ın istediği Node 24 zorlamasını çevre değişkeni olarak ekliyoruz +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' + +jobs: + mirror_to_gitlab: + runs-on: ubuntu-latest + steps: + - name: Kodu Çek + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: GitLab'a Aynala + run: | + # Git kimlik bilgilerini geçici olarak ayarla + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + # GitLab uzak sunucusunu tanımla + git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/PisiLinux/core.git + + # Dalları senkronize et ve silinenleri temizle + git push gitlab --prune --all + + # Etiketleri (Tags) ZORLA (-f) senkronize et + git push gitlab --prune --tags -f