|
| 1 | +name: 'Sync Comparison Data' |
| 2 | + |
| 3 | +on: |
| 4 | + # Triggered by paseo-network/runtimes repository |
| 5 | + repository_dispatch: |
| 6 | + types: [sync-comparison-data] |
| 7 | + # Allow manual trigger |
| 8 | + workflow_dispatch: |
| 9 | + # Optional: scheduled sync (weekly on Monday at 9:00 UTC) |
| 10 | + schedule: |
| 11 | + - cron: '0 9 * * 1' |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +jobs: |
| 18 | + sync: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + permissions: |
| 21 | + contents: write |
| 22 | + pull-requests: write |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Checkout repository |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + ref: dev |
| 29 | + |
| 30 | + - name: Setup pnpm |
| 31 | + uses: pnpm/action-setup@v4 |
| 32 | + with: |
| 33 | + version: 9 |
| 34 | + |
| 35 | + - name: Setup Node.js |
| 36 | + uses: actions/setup-node@v4 |
| 37 | + with: |
| 38 | + node-version: '20' |
| 39 | + cache: 'pnpm' |
| 40 | + |
| 41 | + - name: Install dependencies |
| 42 | + run: pnpm install --frozen-lockfile |
| 43 | + |
| 44 | + - name: Run sync script |
| 45 | + run: pnpm run sync:comparison |
| 46 | + |
| 47 | + - name: Check for changes |
| 48 | + id: changes |
| 49 | + run: | |
| 50 | + if git diff --quiet src/constants/comparison-data.ts; then |
| 51 | + echo "has_changes=false" >> $GITHUB_OUTPUT |
| 52 | + else |
| 53 | + echo "has_changes=true" >> $GITHUB_OUTPUT |
| 54 | + fi |
| 55 | +
|
| 56 | + - name: Create Pull Request |
| 57 | + if: steps.changes.outputs.has_changes == 'true' |
| 58 | + uses: peter-evans/create-pull-request@v7 |
| 59 | + with: |
| 60 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 61 | + commit-message: 'chore: sync comparison data from runtimes repo' |
| 62 | + title: 'chore: sync comparison data from runtimes repo' |
| 63 | + body: | |
| 64 | + This PR was automatically generated to sync the comparison data from [paseo-network/runtimes](https://github.com/paseo-network/runtimes#testnet-vs-production). |
| 65 | +
|
| 66 | + ## Changes |
| 67 | + - Updated `src/constants/comparison-data.ts` with latest features and costs data |
| 68 | +
|
| 69 | + ## Source |
| 70 | + - Repository: `paseo-network/runtimes` |
| 71 | + - Section: [Testnet vs Production](https://github.com/paseo-network/runtimes#testnet-vs-production) |
| 72 | +
|
| 73 | + --- |
| 74 | + *This PR was auto-generated by the sync-comparison-data workflow.* |
| 75 | + branch: sync/comparison-data |
| 76 | + base: dev |
| 77 | + delete-branch: true |
| 78 | + labels: | |
| 79 | + automated |
| 80 | + sync |
0 commit comments