Skip to content

Sync upstream

Sync upstream #5

Workflow file for this run

name: Sync upstream
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: sync-upstream
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'getterobo/codex-plugin'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out fork
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Merge upstream main
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://github.com/21st-dev/codex-plugin.git
git fetch upstream main
if git merge-base --is-ancestor upstream/main HEAD; then
echo "Fork already contains upstream/main."
exit 0
fi
git merge --no-edit upstream/main
git push origin HEAD:main