Skip to content
name: Sync to SDK Repository
on:
push:
paths:
- 'typed_contracts/**'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source repo
uses: actions/checkout@v2
- name: Create new branch and push
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
git clone https://${{ secrets.XSIGNER_ACCESS_TOKEN }}@github.com/protofire/xsigners-sdk.git xsigners_sdk
cp -r typed_contracts xsigners_sdk/src/
cd xsigners_sdk
git remote set-url origin https://${{ secrets.XSIGNER_ACCESS_TOKEN }}@github.com/protofire/xsigners-sdk.git
git checkout -b sync-contracts-src
git add .
git commit -m "Sync from contracts source repo"
git push origin sync-contracts-src
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: "sync-contracts-src"
destination_branch: "main"
github_token: ${{ secrets.XSIGNER_ACCESS_TOKEN }}
pr_title: "Sync from contracts source repo"
pr_body: "This PR is auto-generated by GitHub Action. Please review the changes."