A GitHub Action for syncing between two independent repositories using force push to maintain a close collaboraiton between agencies and WP VIP.
- Sync branches for review and future merge from external to WP VIP GitHub repository
- Sync protected WP VIP branches back to external GitHub repository
- GitHub action can be triggered on a timer or on push
# File: .github/workflows/repo-sync.yml
on:
push:
branches:
- 'master'
- 'develop'
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- name: repo-sync
uses: capgemini-macs/wpcomvip-git-sync@v0.1.4
env:
SOURCE_REPO: ""
DESTINATION_REPO: ""
BRANCH: ""
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_PRIVATE_KEY
can be omitted if using authenticated HTTPS repo clone urls like https://username:access_token@github.com/username/repository.git
.
Based on [git-sync] by Wei He github@weispot.com Maintained by Capgemini MACS