Skip to content

Commit

Permalink
ci: modify gha to trigger pr instead of push branch
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Jan 6, 2025
1 parent 9f6e19a commit 47146d7
Show file tree
Hide file tree
Showing 2 changed files with 8,198 additions and 11,166 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/sync-auto-pay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@ jobs:
steps:
- name: Checkout Source Repo
uses: actions/checkout@v4
with:
path: source-repo

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

- name: Configure Git
- name: Configure Git in Target Repo
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
cd target-repo
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: Clone Target Repo
- name: Sync Directory
run: |
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/mediar-ai/screenpipe.git target-repo
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
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/
- name: Create Branch and Sync Directory
- name: Commit and Push Changes
run: |
cd target-repo
git checkout -b ${{ github.event.inputs.branch_name }}
mkdir -p pipes/auto-pay
cp -r ../pipes/auto-pay/* pipes/auto-pay/
git add .
git commit -m "${{ github.event.inputs.commit_message }}"
git push origin ${{ github.event.inputs.branch_name }}
Expand Down
Loading

0 comments on commit 47146d7

Please sign in to comment.