@@ -11,12 +11,20 @@ jobs:
1111 sync-to-monorepo :
1212 if : github.event.pull_request.merged == true
1313 runs-on : ubuntu-latest
14+ env :
15+ GH_TOKEN : ${{ secrets.MONOREPO_SYNC_TOKEN }}
16+ PR_NUMBER : ${{ github.event.pull_request.number }}
17+ PR_TITLE : ${{ github.event.pull_request.title }}
18+ PR_AUTHOR : ${{ github.event.pull_request.user.login }}
19+ SOURCE_REPO_NAME : ${{ github.event.repository.name }}
20+ MONOREPO_PACKAGE_LOCATION : packages/${{ github.event.repository.name }}
21+ MONOREPO_PATH : ${{ github.workspace }}/monorepo
1422
1523 steps :
1624 - name : Checkout repository
1725 uses : actions/checkout@v4
1826 with :
19- fetch-depth : 0
27+ fetch-depth : 1
2028
2129 - name : Setup Node.js
2230 uses : actions/setup-node@v4
@@ -26,15 +34,16 @@ jobs:
2634 - name : Install dependencies
2735 # Install project dependencies (including dev dependencies)
2836 run : npm install
37+ - name : Install zx
38+ run : npm install zx
39+
40+ - name : Install monorepo-sync package
41+ run : npm install git+https://github.com/formio/monorepo-sync.git
42+ - name : Clone Monorepo
43+ run : |
44+ gh repo clone formio/formio-monorepo monorepo -- --depth=1
2945
3046 - name : Sync to Monorepo
31- env :
32- GH_TOKEN : ${{ secrets.MONOREPO_SYNC_TOKEN }}
33- PR_NUMBER : ${{ github.event.pull_request.number }}
34- PR_TITLE : ${{ github.event.pull_request.title }}
35- PR_AUTHOR : ${{ github.event.pull_request.user.login }}
36- SOURCE_REPO_NAME : ${{ github.event.repository.name }}
37- MONOREPO_PACKAGE_LOCATION : apps/formio-server
3847 run : |
3948 echo "Syncing PR #${PR_NUMBER}: ${PR_TITLE}"
40- node .github/workflows/sync-monorepo.mjs
49+ node .github/workflows/sync-monorepo.mjs
0 commit comments