Skip to content

Commit 8f42ed2

Browse files
committed
fix: Mirroring for live repo
1 parent 4872a02 commit 8f42ed2

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.github/workflows/gitlab-mirror-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on: [push, delete]
44

55
# Ensures that only one mirror task will run at a time.
66
concurrency:
7-
group: git-mirror
7+
group: to_gitlab
88

99
jobs:
10-
git-mirror:
10+
to_gitlab:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
@@ -24,4 +24,4 @@ jobs:
2424
SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
2525
with:
2626
source-repo: "git@github.com:visualize-admin/visualization-tool.git"
27-
destination-repo: "git@gitlab.ldbar.ch:interactivethings/visualize-mirroring-test.git"
27+
destination-repo: "git@gitlab.ldbar.ch:interactivethings/visualize-mirroring-test.git"

.github/workflows/gitlab-mirror.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@ name: GitLab Mirror
22

33
on: [push, delete]
44

5+
# Ensures that only one mirror task will run at a time.
6+
concurrency:
7+
group: to_gitlab
8+
59
jobs:
610
to_gitlab:
711
runs-on: ubuntu-latest
8-
steps: # <-- must use actions/checkout@v4 before mirroring!
12+
steps:
913
- name: Checkout
1014
uses: actions/checkout@v4
1115
with:
1216
fetch-depth: 0
13-
- name: Re-install old version of git # <-- temporary workaround for git version issue w/ v2.48.1 (installs git v2.43.0 on 24.04 LTS)
17+
- name: Logging
1418
run: |
15-
sudo apt-get update
16-
sudo apt-get purge git
17-
sudo apt-get autoremove
18-
sudo apt-get install git
19+
git remote show origin
1920
git for-each-ref
2021
- name: Mirror to GitLab
21-
uses: pixta-dev/repository-mirroring-action@v1
22+
uses: wearerequired/git-mirror-action@v1
23+
env:
24+
SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
2225
with:
23-
target_repo_url: git@gitlab.ldbar.ch:interactivethings/visualization-tool.git
24-
ssh_private_key: # <-- use 'secrets' to pass credential information.
25-
${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
26+
source-repo: "git@github.com:visualize-admin/visualization-tool.git"
27+
destination-repo: "git@gitlab.ldbar.ch:interactivethings/visualization-tool.git"

0 commit comments

Comments
 (0)