Skip to content

Sync Fork with Upstream #92

Sync Fork with Upstream

Sync Fork with Upstream #92

Workflow file for this run

name: Sync Fork with Upstream
on:
schedule:
- cron: '0 8 * * *' # Runs at 8 AM UTC daily
workflow_dispatch: # Allows manual trigger
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Add Upstream Remote
run: |
git remote | grep upstream || git remote add upstream https://github.com/jakobdylanc/llmcord.git
- name: Fetch Upstream
run: git fetch upstream
- name: Merge Upstream Changes (always favor upstream)
run: |
git merge -X theirs upstream/main --allow-unrelated-histories || {
git checkout --theirs .
git add .
git commit -m "Resolve merge conflicts in favor of upstream"
}
- name: Push Changes
run: git push https://x-access-token:${GITHUB_TOKEN}@github.com/karoltheguy/llmcord.git main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}