"tv-scripting-597 (21ff138722941bdf9d31a03a65ca89eb1917a0de)" #7209
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
name: Mirroring repo | |
on: | |
push | |
jobs: | |
mirroring: | |
if: github.repository == 'multicharts/study_repo_data' | |
runs-on: ubuntu-latest | |
steps: | |
- uses : actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Preparing to mirror | |
run: | | |
mkdir -p ~/.ssh && echo "${{ secrets.MIRROR_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa | |
- name: Mirroring to destination repo | |
env: | |
TARGET_REPO_URL: 'git@github.com:tradingview/study_repo_data.git' | |
run: | | |
git remote add mirror $TARGET_REPO_URL && git push --progress --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' |