Advertisement
mivebe

github duplicate repos VC

Nov 21st, 2023
711
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | Software | 0 0
  1. name: Sync Repositories
  2.  
  3. on:
  4.   push:
  5.     branches:
  6.       - main  # Adjust based on your branch names
  7.  
  8. jobs:
  9.   sync:
  10.     runs-on: ubuntu-latest
  11.  
  12.     steps:
  13.       - name: Checkout Repository
  14.         uses: actions/checkout@v3
  15.  
  16.       - name: Push to Other Repository
  17.         run: |
  18.           git remote add other-repo <URL_of_other_repo>
  19.           git push other-repo HEAD:main --follow-tags --force
  20.         env:
  21.           PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
Tags: github actions
Advertisement
Comments
  • mivebe
    1 year
    # Bash 0.14 KB | 0 0
    1. test action that should be run on both sides of two duplicate repos to maintain same version on both ends regardless of where a commit is pushed
Add Comment
Please, Sign In to add comment
Advertisement