mirror of
https://github.com/rehlds/relocalizebugfix.git
synced 2025-01-27 21:27:55 +03:00
STAM
7c3a2dc1cc
Some checks failed
Automatic sync with Gitlab's read-only mirror / mirror (push) Has been cancelled
README.md by @wopox1337 Added License
32 lines
977 B
YAML
32 lines
977 B
YAML
name: Automatic sync with Gitlab's read-only mirror
|
|
|
|
on: [workflow_dispatch, push]
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up SSH key for Runner
|
|
env:
|
|
SSH_KEY: ${{ secrets.GITLAB_DEPLOY_KEY }}
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
|
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
|
|
|
|
- name: Clone repository from GitHub as mirror and push to Gitlab
|
|
env:
|
|
REPO_ORIGINAL: "https://github.com/rehlds/relocalizebugfix.git"
|
|
REPO_TARGET: "git@gitlab.com:rehlds/relocalizebugfix.git"
|
|
run: |
|
|
git clone --mirror "$REPO_ORIGINAL" repo-mirror
|
|
cd repo-mirror
|
|
git remote set-url origin "$REPO_TARGET"
|
|
git push --mirror --force
|