Update mirror.yml
This commit is contained in:
@@ -3,11 +3,15 @@ name: GitLab'a Yedekle
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '*' # Tüm dallardaki (branch) değişiklikleri tetikler
|
- '*'
|
||||||
delete:
|
delete:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
|
# GitHub'ın istediği Node 24 zorlamasını çevre değişkeni olarak ekliyoruz
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mirror_to_gitlab:
|
mirror_to_gitlab:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -15,14 +19,17 @@ jobs:
|
|||||||
- name: Kodu Çek
|
- name: Kodu Çek
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Tüm geçmişi ve dalları çekmek için gerekli
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: GitLab'a Aynala
|
- name: GitLab'a Aynala
|
||||||
run: |
|
run: |
|
||||||
# GitLab uzak sunucusunu güvenli şekilde HTTPS ve token ile tanımlıyoruz
|
# Git kimlik bilgilerini geçici olarak ayarla (Olası push hatalarını engellemek için)
|
||||||
# GitHub kullanıcı adınızı ve GitLab depo yolunuzu kendinize göre düzenleyin
|
git config --global user.name "GitHub Actions"
|
||||||
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@https://gitlab.com/PisiLinux/main.git
|
git config --global user.email "actions@github.com"
|
||||||
|
|
||||||
|
# GitLab uzak sunucusunu tanımla
|
||||||
|
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/gitlab_kullanici_adi/gitlab_repo_adi.git
|
||||||
|
|
||||||
# Tüm dalları ve etiketleri (tags) zorla GitLab'a gönder
|
# Aynalama işlemini gerçekleştir
|
||||||
git push gitlab --prune --all
|
git push gitlab --prune --all
|
||||||
git push gitlab --prune --tags
|
git push gitlab --prune --tags
|
||||||
|
|||||||
Reference in New Issue
Block a user