Skip to content

Commit 22929c5

Browse files
committed
ci: keep Xcode Cloud branch synced with upstream
1 parent 94bf633 commit 22929c5

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Sync Xcode Cloud branch
2+
3+
on:
4+
schedule:
5+
- cron: "17 */3 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: sync-xcode-cloud
13+
cancel-in-progress: true
14+
15+
jobs:
16+
sync:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check out the Xcode Cloud branch
20+
uses: actions/checkout@v4
21+
with:
22+
ref: codex/xcode-cloud
23+
fetch-depth: 0
24+
25+
- name: Merge current upstream main
26+
shell: bash
27+
run: |
28+
set -euo pipefail
29+
git config user.name "github-actions[bot]"
30+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
git remote add upstream https://github.com/pingdotgg/t3code.git
32+
git fetch upstream main
33+
34+
if git merge-base --is-ancestor upstream/main HEAD; then
35+
echo "codex/xcode-cloud already contains upstream/main"
36+
exit 0
37+
fi
38+
39+
git merge --no-edit upstream/main
40+
git push origin HEAD:codex/xcode-cloud

0 commit comments

Comments
 (0)