-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add draft for repo mirroring * Create mirror_repo_to_gitlab.yml * Update mirror_repo_to_gitlab.yml * Update mirror_repo_to_gitlab.yml * Update mirror-repo.yml * Update mirror-repo.yml
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Mirror repo | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
GITLAB_URL: | ||
required: true | ||
GITLAB_USER: | ||
required: true | ||
GITLAB_PASSWORD: | ||
required: true | ||
|
||
jobs: | ||
mirror: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- id: mirror-1 | ||
uses: yesolutions/mirror-action@master | ||
continue-on-error: true | ||
with: | ||
REMOTE: ${{ secrets.GITLAB_URL }} | ||
GIT_USERNAME: ${{ secrets.GITLAB_USER }} | ||
GIT_PASSWORD: ${{ secrets.GITLAB_PASSWORD }} | ||
|
||
- run: sleep 60s | ||
shell: bash | ||
if: ${{ steps.mirror-1.outcome == 'failure' }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
if: ${{ steps.mirror-1.outcome == 'failure' }} | ||
- run: sudo git remote remove mirror || true | ||
if: ${{ steps.mirror-1.outcome == 'failure' }} | ||
- id: mirror-2 | ||
uses: yesolutions/mirror-action@master | ||
continue-on-error: true | ||
with: | ||
REMOTE: ${{ secrets.GITLAB_URL }} | ||
GIT_USERNAME: ${{ secrets.GITLAB_USER }} | ||
GIT_PASSWORD: ${{ secrets.GITLAB_PASSWORD }} | ||
if: ${{ steps.mirror-1.outcome == 'failure' }} | ||
|
||
- run: sleep 60s | ||
shell: bash | ||
if: ${{ steps.mirror-2.outcome == 'failure' }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
if: ${{ steps.mirror-2.outcome == 'failure' }} | ||
- run: sudo git remote remove mirror || true | ||
if: ${{ steps.mirror-2.outcome == 'failure' }} | ||
- id: mirror-3 | ||
uses: yesolutions/mirror-action@master | ||
continue-on-error: true | ||
with: | ||
REMOTE: ${{ secrets.GITLAB_URL }} | ||
GIT_USERNAME: ${{ secrets.GITLAB_USER }} | ||
GIT_PASSWORD: ${{ secrets.GITLAB_PASSWORD }} | ||
if: ${{ steps.mirror-2.outcome == 'failure' }} | ||
|
||
- run: sleep 60s | ||
shell: bash | ||
if: ${{ steps.mirror-3.outcome == 'failure' }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
if: ${{ steps.mirror-3.outcome == 'failure' }} | ||
- run: sudo git remote remove mirror || true | ||
if: ${{ steps.mirror-3.outcome == 'failure' }} | ||
- id: mirror-4 | ||
uses: yesolutions/mirror-action@master | ||
with: | ||
REMOTE: ${{ secrets.GITLAB_URL }} | ||
GIT_USERNAME: ${{ secrets.GITLAB_USER }} | ||
GIT_PASSWORD: ${{ secrets.GITLAB_PASSWORD }} | ||
if: ${{ steps.mirror-3.outcome == 'failure' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Mirror repo to GitLab | ||
|
||
on: [push, delete] | ||
|
||
jobs: | ||
call-dream-ops-mirror-workflow: | ||
uses: ./.github/workflows/mirror-repo.yml | ||
secrets: | ||
GITLAB_URL: ${{ secrets.GITLAB_URL }} | ||
GITLAB_USER: ${{ secrets.GITLAB_USER }} | ||
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }} |