Skip to content

Commit 3779e99

Browse files
authored
fix: Sync Workflow Lives in Chronon (#743)
## Summary My strategy to use a reuseble workflow doesn't work anymore because a private workflow isn't accessible from a public repo. Instead of triggering the sync, this simply runs it from here. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Removed the previous canary release workflow, including automated build, test, and artifact deployment steps for AWS and GCP. - Introduced a new workflow to automate synchronization of code from the chronon repository into the platform repository via subtree pull and push operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 070bf42 commit 3779e99

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Push to Platform
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
subtree-pull:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout platform repo
14+
uses: actions/checkout@v4
15+
with:
16+
repository: "zipline-ai/platform"
17+
ssh-key: ${{ secrets.PLATFORM_REPO_DEPLOY_KEY }}
18+
fetch-depth: 0 # Required for subtree operations
19+
ref: main # Ensure we're on the main branch
20+
21+
- name: Set up Git config
22+
run: |
23+
git config user.name "GitHub Actions"
24+
git config user.email "[email protected]"
25+
26+
- name: Set up SSH key for Chronon access and pull subtree
27+
env:
28+
SSH_PRIVATE_KEY: ${{ secrets.CHRONON_REPO_DEPLOY_KEY }}
29+
run: |
30+
mkdir -p ~/.ssh
31+
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
32+
chmod 600 ~/.ssh/id_rsa
33+
34+
# Add GitHub's SSH key to known_hosts
35+
ssh-keyscan github.com >> ~/.ssh/known_hosts
36+
37+
# Set up SSH agent
38+
eval "$(ssh-agent -s)"
39+
ssh-add ~/.ssh/id_rsa
40+
41+
# Create basic SSH config
42+
cat > ~/.ssh/config << EOF
43+
Host github.com
44+
User git
45+
IdentityFile ~/.ssh/id_rsa
46+
StrictHostKeyChecking no
47+
EOF
48+
49+
# Add the SSH remote
50+
git remote add chronon [email protected]:zipline-ai/chronon.git || true
51+
52+
git fetch chronon main
53+
git subtree pull --prefix=chronon chronon main --message="chore: update chronon subtree"
54+
55+
- name: Push changes to platform
56+
run: git push origin main

0 commit comments

Comments
 (0)