Skip to content

mirror

mirror #533

Workflow file for this run

name: mirror
on:
workflow_dispatch:
schedule:
- cron: "0 7,19 * * 1,2,3,4,5"
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GH_ENTERPRISE_INTERNAL_SSH_PRIVATE_KEY }}
- name: Add host
run: ssh-keyscan github.mpi-internal.com >> /home/runner/.ssh/known_hosts
- name: Restart user agent
run: eval "$(ssh-agent)"
- name: Add remote internal repository url
run: git remote add internal ${{ secrets.GH_ENTERPRISE_INTERNAL_SSH_REPOSITORY_URL }}
- name: Push main to internal repository
run: git push -u internal main --force