Merge pull request #22 from devchat-ai/sync_github_to_gitlab
Sync GitHub to gitlab
This commit is contained in:
commit
c83b273e64
32
.github/workflows/sync-to-gitlab.yml
vendored
Normal file
32
.github/workflows/sync-to-gitlab.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Sync to GitLab
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout GitHub repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config user.name "gh-action"
|
||||
git config user.email "gh-action@merico.dev"
|
||||
|
||||
- name: Add GitLab remote
|
||||
run: |
|
||||
git remote add gitlab https://oauth2:${{ secrets.GITLAB_ACCESS_TOKEN }}@gitlab.com/devchat-ai/workflows.git
|
||||
|
||||
- name: Retry Command
|
||||
uses: nick-invision/retry@v2
|
||||
with:
|
||||
timeout_minutes: 10
|
||||
max_attempts: 3
|
||||
command: |
|
||||
git fetch gitlab &&
|
||||
git rebase gitlab/main &&
|
||||
git push gitlab
|
Loading…
x
Reference in New Issue
Block a user