forked from pisilinux/main
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 983 Bytes
/
Copy pathmirror.yml
File metadata and controls
37 lines (30 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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/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