Files
main/.github/workflows/mirror.yml
T
2026-06-01 11:54:47 +03:00

38 lines
983 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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/main.git
# Dalları senkronize et ve silinenleri temizle
git push gitlab --prune --all
# Etiketleri (Tags) ZORLA (-f) senkronize et
git push gitlab --prune --tags -f