Skip to content

Commit 6cbad23

Browse files
chore: updates workflow to run on PRs when openrpc.json is updated (#4190)
Signed-off-by: Konstantina Blazhukova <[email protected]> Signed-off-by: PavelSBorisov <[email protected]> Co-authored-by: PavelSBorisov <[email protected]>
1 parent bafc12a commit 6cbad23

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/openrpc-updater.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: OpenRPC JSON Updater
32

43
on:
@@ -7,6 +6,11 @@ on:
76
- main
87
paths:
98
- 'docs/openrpc.json'
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- 'docs/openrpc.json'
1014
workflow_dispatch:
1115

1216
permissions:
@@ -25,7 +29,7 @@ jobs:
2529
- name: Checkout execution-apis repo
2630
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2731
with:
28-
ref: main
32+
ref: v1.0.0-beta.4
2933
repository: 'ethereum/execution-apis'
3034
path: 'execution-apis'
3135

@@ -35,7 +39,7 @@ jobs:
3539
node-version: 22.17
3640

3741
- name: Install dependencies
38-
run: npm install
42+
run: npm ci
3943
working-directory: ./execution-apis
4044

4145
- name: Build project
@@ -60,8 +64,7 @@ jobs:
6064
- name: Checkout repository
6165
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6266
with:
63-
ref: 'main'
64-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
67+
token: ${{ secrets.GH_ACCESS_TOKEN }}
6568

6669
- name: Download openrpc.json artifact
6770
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
@@ -81,7 +84,7 @@ jobs:
8184

8285
- name: Install dependencies
8386
working-directory: scripts/openrpc-json-updater
84-
run: npm install
87+
run: npm ci
8588

8689
- name: Generate comparison report
8790
id: generate-report
@@ -130,12 +133,12 @@ jobs:
130133
echo "Generated unique branch name: ${UNIQUE_BRANCH}"
131134
132135
- name: Create Pull Request
133-
if: env.SKIP_PR != 'true'
136+
if: ${{ env.SKIP_PR != 'true' }}
134137
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
135138
with:
136-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
139+
token: ${{ secrets.GH_ACCESS_TOKEN }}
137140
commit-message: Update OpenRPC JSON
138-
title: 'Update OpenRPC JSON'
141+
title: 'docs: Update OpenRPC JSON'
139142
body: |
140143
# OpenRPC JSON Update
141144

0 commit comments

Comments
 (0)