Skip to content

Commit 79a4437

Browse files
committed
Added GitLab auto-sync
1 parent 6e23a37 commit 79a4437

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Sync changes to GitLab
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
if: (github.repository == 'adamlui/chatgpt-widescreen')
13+
runs-on: ubuntu-latest
14+
env:
15+
TZ: PST8PDT
16+
17+
steps:
18+
19+
- name: Checkout adamlui/chatgpt-widescreen
20+
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Push changes to gitlab.com/adamlui/chatgpt-widescreen
25+
run: |
26+
git push --force -o ci.skip \
27+
https://oauth2:${{ secrets.GITLAB_SYNC_PAT }}@gitlab.com/adamlui/chatgpt-widescreen.git main

.gitlab-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sync_to_github:
2+
rules:
3+
- if: $CI_COMMIT_BRANCH == "main" && $CI_PROJECT_PATH == "adamlui/chatgpt-widescreen"
4+
image: alpine:latest
5+
script:
6+
- apk add --no-cache git
7+
- git clone https://gitlab.com/adamlui/chatgpt-widescreen.git
8+
- git push --force -o ci.skip https://${GITHUB_SYNC_PAT}@github.com/adamlui/chatgpt-widescreen.git HEAD:main

0 commit comments

Comments
 (0)