Skip to content

Auto Sync Fork (SSH) #17

Auto Sync Fork (SSH)

Auto Sync Fork (SSH) #17

Workflow file for this run

name: Auto Sync Fork (SSH)
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout fork
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Sync with upstream
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"
git remote add upstream git@github.com:ArjunVasavan/code_drop.git
git fetch upstream
git checkout main
git merge upstream/main
git push origin main