Raise PR to Klavis mcp_servers #8
Workflow file for this run
This file contains hidden or 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: Raise PR to Klavis mcp_servers | |
| on: | |
| push: | |
| tags: | |
| - 'klavis.*' | |
| branches: | |
| - '**' | |
| jobs: | |
| raise-pr: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.KLAVIS_PR_TOKEN }} | |
| KLAVIS_REPO: klavis-ai/mcp_servers | |
| BRANCH_NAME: cashfree-mcp-${{ github.ref_name }}-pr | |
| steps: | |
| - name: Checkout cashfree-mcp | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name "siva.durga:cashfree" | |
| git config --global user.email "siva.durga@cashfree.com" | |
| - name: Fork and clone Klavis mcp_servers | |
| run: | | |
| git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.actor }}/klavis.git klavis-mcp_servers | |
| cd klavis-mcp_servers | |
| git remote add upstream https://github.com/Klavis-AI/klavis.git | |
| git fetch upstream | |
| git checkout main || git checkout -b main | |
| git pull upstream main || true | |
| - name: Sync files to forked repo | |
| run: | | |
| rsync -av --exclude='.git' ./ klavis-mcp_servers/cashfree-mcp/ | |
| - name: Create PR branch on fork | |
| run: | | |
| cd klavis-mcp_servers | |
| git checkout -b ${BRANCH_NAME} | |
| git add . | |
| git commit -m "Sync from cashfree-mcp tag ${{ github.ref_name }}" | |
| git push origin ${BRANCH_NAME} | |
| - name: Create Pull Request to upstream | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.KLAVIS_PR_TOKEN }} | |
| path: klavis-mcp_servers | |
| commit-message: "Sync from cashfree-mcp tag ${{ github.ref_name }}" | |
| branch: ${{ env.BRANCH_NAME }} | |
| title: "[Automated] Sync from cashfree-mcp tag ${{ github.ref_name }}" | |
| body: | | |
| Automated PR to sync changes from cashfree-mcp tag `${{ github.ref_name }}`. | |
| base: main | |
| push-to-fork: true | |