mirror #535
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: 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 |