Skip to content

reverse legal text back after mistake. sb #2

reverse legal text back after mistake. sb

reverse legal text back after mistake. sb #2

name: Sync Repos
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v3
- name: Push to destination repository
run: |
# Set Git user details
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
# Clone the destination repository
git clone https://${{ secrets.SYNC_WORKFLOW }}@github.com/superformlabs/ga4dataform.git destination-repo
cd destination-repo
# Add the source repository as a remote
git remote add source-repo https://${{ secrets.SYNC_WORKFLOW }}@github.com/superformlabs/ga4dataform-model-dev.git
# Fetch changes from source repository
git fetch source-repo
# Merge changes from source, excluding specific files
git checkout source-repo/main -- . ':(exclude)includes/unit_tests/**' ':(exclude)definitions/core/unit_testing/**'
# Commit changes (if any)
git add .
git diff-index --quiet HEAD || git commit -m "Automated sync from ga4dataform-model-dev"
# Push changes to the destination repository
git push origin main