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

36 lines
946 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 (Olası push hatalarını engellemek için)
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
# Aynalama işlemini gerçekleştir
git push gitlab --prune --all
git push gitlab --prune --tags