Mirror Repository #9262
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 Repository | |
on: | |
schedule: | |
- cron: '*/2 * * * *' # Run every 1 minute | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Git | |
run: | | |
git config user.name "Naveenmorty" | |
git config user.email "[email protected]" | |
- name: Fetch changes | |
run: | | |
git fetch --prune --tags | |
git pull origin main # Change 'main' to your branch name | |
- name: Push to mirror repository | |
run: | | |
git remote add mirror https://Naveenmorty:[email protected]/Naveenmorty/githubaction.git | |
git push mirror main # Change 'main' to your branch name | |
env: | |
GH_TOKEN: ${{ secrets.REPO_NAME }} |