Skip to content

Commit

Permalink
fix: attempt ci fix for pipe sync
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Jan 6, 2025
1 parent 47146d7 commit 7224c28
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/sync-auto-pay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,52 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Repo
- name: Checkout Source Repo (Your Repo)
uses: actions/checkout@v4
with:
path: source-repo

- name: Checkout Target Repo
- name: Checkout different-ai/screenpipe
uses: actions/checkout@v4
with:
repository: mediar-ai/screenpipe
path: target-repo
repository: different-ai/screenpipe
path: different-ai-repo
token: ${{ secrets.GH_TOKEN }}

- name: Configure Git in Target Repo
- name: Sync different-ai with mediar-ai
run: |
cd target-repo
cd different-ai-repo
git remote add upstream https://github.com/mediar-ai/screenpipe.git
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
- name: Create and Switch to New Branch
run: |
cd different-ai-repo
git checkout -b ${{ github.event.inputs.branch_name }}
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b ${{ github.event.inputs.branch_name }}
- name: Sync Directory
- name: Sync Auto-Pay Directory
run: |
rm -rf target-repo/pipes/auto-pay
mkdir -p target-repo/pipes/auto-pay
cp -r source-repo/pipes/auto-pay/* target-repo/pipes/auto-pay/
rm -rf different-ai-repo/pipes/auto-pay
mkdir -p different-ai-repo/pipes/auto-pay
cp -r source-repo/pipes/auto-pay/* different-ai-repo/pipes/auto-pay/
- name: Commit and Push Changes
run: |
cd target-repo
cd different-ai-repo
git add .
git commit -m "${{ github.event.inputs.commit_message }}"
git push origin ${{ github.event.inputs.branch_name }}
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: ${{ github.event.inputs.branch_name }}
source_branch: "${{ github.event.inputs.branch_name }}"
source_repo: "different-ai/screenpipe"
destination_repository: "mediar-ai/screenpipe"
destination_branch: "main"
pr_title: "${{ github.event.inputs.commit_message }}"
Expand Down

0 comments on commit 7224c28

Please sign in to comment.