Sync Auto-Pay Pipe #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Auto-Pay Pipe | |
on: | |
workflow_dispatch: | |
inputs: | |
branch_name: | |
description: 'Branch name for the PR' | |
required: true | |
default: 'feat/add-auto-pay-pipe' | |
commit_message: | |
description: 'Commit message' | |
required: true | |
default: 'feat: add auto-pay pipe' | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- name: Checkout Source Repo (Your Repo) | |
uses: actions/checkout@v4 | |
with: | |
path: source-repo | |
- name: Checkout different-ai/screenpipe | |
uses: actions/checkout@v4 | |
with: | |
repository: different-ai/screenpipe | |
path: different-ai-repo | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Sync different-ai with mediar-ai | |
run: | | |
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" | |
- name: Sync Auto-Pay Directory | |
run: | | |
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 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 | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
cd different-ai-repo | |
gh pr create \ | |
--repo mediar-ai/screenpipe \ | |
--base main \ | |
--head different-ai:${{ github.event.inputs.branch_name }} \ | |
--title "${{ github.event.inputs.commit_message }}" \ | |
--body "🤖 Auto-generated PR to sync auto-pay pipe | |
This PR adds the auto-pay pipe which enables automatic payment processing using the Wise API. | |
### Features: | |
- Automatic payment detection | |
- Wise API integration | |
- Production/Sandbox mode support | |
### Configuration: | |
The pipe requires the following configuration: | |
- \`wiseApiKey\`: Wise API Key | |
- \`wiseProfileId\`: Wise Profile ID | |
- \`enableProduction\`: Boolean to toggle production mode | |
Please review the changes and ensure they meet the project's standards." \ | |
--label "enhancement" \ | |
--label "pipe" \ | |
--reviewer "mediar-ai/maintainers" |