Workflow file for this run
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: Sync branches between repos | |
on: | |
push: | |
branches: | |
- actions | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source repository | |
uses: actions/checkout@v2 | |
with: | |
repository: RusabKhan/OpenETL | |
ref: main # Use the same branch or tag that triggered the workflow | |
- name: Configure SSH and Copy changes to target repository | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa | |
chmod 400 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
git clone git@github.com:RusabKhan/OpenETL-Pro.git target-repo | |
cp -r ./* target-repo/ | |
cd target-repo | |
git add . | |
git commit -m "Sync changes from main branch of OpenETL" | |
git push origin sync # Adjust target branch name if needed |