Skip to content

Commit 5115dc5

Browse files
authored
Merge pull request #45 from Zondax/dev
Automates comparison data sync
2 parents fc69c90 + 49ee6d9 commit 5115dc5

22 files changed

Lines changed: 1479 additions & 163 deletions
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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

biome.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
},
2626
"css": {
2727
"parser": {
28-
"cssModules": true,
29-
"tailwindDirectives": true
28+
"cssModules": true
3029
},
3130
"formatter": {
3231
"enabled": true

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"test:e2e:ui": "playwright test e2e --ui",
2626
"test:links": "linkinator http://localhost:3000 --skip 'github.com'",
2727
"test:ui": "vitest --ui",
28-
"test:watch": "vitest"
28+
"test:watch": "vitest",
29+
"sync:comparison": "tsx scripts/sync-comparison-data.ts"
2930
},
3031
"dependencies": {
3132
"@radix-ui/react-accordion": "^1.2.11",
@@ -63,6 +64,7 @@
6364
"linkinator": "^6.1.4",
6465
"sort-package-json": "^3.4.0",
6566
"tailwindcss": "^4",
67+
"tsx": "^4.21.0",
6668
"tw-animate-css": "^1.3.5",
6769
"typescript": "^5",
6870
"vitest": "^4.0.4"

0 commit comments

Comments
 (0)