Skip to content

build: manage the python env locally #5

build: manage the python env locally

build: manage the python env locally #5

name: Mirror code to target repository
on:
push:
workflow_dispatch:
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Set up SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.GH_SSH_PRIVATE_KEY }}
known_hosts: 'github.com'
- name: Checkout source repository
uses: actions/checkout@v6
- name: Add mirror remote
run: |
git remote add mirror "${{ secrets.GH_TARGET_REPO }}"
- name: Push current branch to mirror
run: |
BRANCH="${GITHUB_REF#refs/heads/}"
echo "Pushing branch $BRANCH"
git push mirror "refs/remotes/origin/$BRANCH:refs/heads/$BRANCH" --force