Skip to content

Commit f3e5a05

Browse files
committed
feat: update runtime to node 24
1 parent 9dbeb59 commit f3e5a05

File tree

12 files changed

+264
-600
lines changed

12 files changed

+264
-600
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v5
1818
- uses: actions/setup-node@v6
1919
with:
20-
node-version: 20.x
20+
node-version-file: package.json
2121
cache: npm
2222
- run: npm ci
2323
- run: npm run build

.github/workflows/update-major-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
type: choice
1212
description: The major version tag to update
1313
options:
14-
- v4
14+
- v5
1515

1616
jobs:
1717
tag:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ubuntu-latest
5555
steps:
5656
- name: Slash Command Dispatch
57-
uses: peter-evans/slash-command-dispatch@v4
57+
uses: peter-evans/slash-command-dispatch@v5
5858
with:
5959
token: ${{ secrets.PAT }}
6060
commands: |
@@ -102,7 +102,7 @@ You can use a [PAT](https://docs.github.com/en/github/authenticating-to-github/c
102102

103103
```yml
104104
- name: Slash Command Dispatch
105-
uses: peter-evans/slash-command-dispatch@v4
105+
uses: peter-evans/slash-command-dispatch@v5
106106
with:
107107
token: ${{ secrets.PAT }}
108108
reaction-token: ${{ secrets.PAT }}
@@ -178,7 +178,7 @@ It will also contain any static arguments if configured.
178178

179179
To demonstrate, take the following configuration as an example.
180180
```yml
181-
- uses: peter-evans/slash-command-dispatch@v4
181+
- uses: peter-evans/slash-command-dispatch@v5
182182
with:
183183
token: ${{ secrets.PAT }}
184184
commands: |
@@ -248,7 +248,7 @@ The simplest response is to add a :tada: reaction to the comment.
248248

249249
```yml
250250
- name: Add reaction
251-
uses: peter-evans/create-or-update-comment@v4
251+
uses: peter-evans/create-or-update-comment@v5
252252
with:
253253
token: ${{ secrets.PAT }}
254254
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -264,7 +264,7 @@ Another option is to reply with a new comment containing a link to the run outpu
264264
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
265265
266266
- name: Create comment
267-
uses: peter-evans/create-or-update-comment@v4
267+
uses: peter-evans/create-or-update-comment@v5
268268
with:
269269
token: ${{ secrets.PAT }}
270270
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ outputs:
4141
error-message:
4242
description: 'Validation errors when using `workflow` dispatch.'
4343
runs:
44-
using: 'node20'
44+
using: 'node24'
4545
main: 'dist/index.js'
4646
branding:
4747
icon: 'target'

dist/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,18 @@ class GitHubHelper {
384384
if (count == 10)
385385
break;
386386
}
387-
yield this.octokit.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow}/dispatches', Object.assign(Object.assign({}, this.parseRepository(cmd.repository)), { workflow: workflow, ref: ref, inputs: inputs }));
388-
core.info(`Command '${cmd.command}' dispatched to workflow '${workflowName}' in '${cmd.repository}'`);
387+
yield this.octokit.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', Object.assign(Object.assign({}, this.parseRepository(cmd.repository)), { workflow_id: workflow, ref: ref, inputs: inputs }));
388+
core.info(`Command '${cmd.command}' dispatched to workflow '${workflow}' in '${cmd.repository}'`);
389389
});
390390
}
391391
getWorkflow(repository, workflowName) {
392392
return __awaiter(this, void 0, void 0, function* () {
393393
core.debug(`Getting workflow ${workflowName} for repository ${repository}`);
394394
const { data: workflows } = yield this.octokit.rest.actions.listRepoWorkflows(Object.assign({}, this.parseRepository(repository)));
395395
for (const workflow of workflows.workflows) {
396-
if (workflow.path === `${workflowName}.yml` || workflow.path === `${workflowName}.yaml`) {
397-
core.info(`Selecting workflow file ${workflow.path}`);
396+
if (workflow.path === `${workflowName}.yml` ||
397+
workflow.path === `${workflowName}.yaml`) {
398+
core.debug(`Selecting workflow file ${workflow.path}`);
398399
return workflow.path;
399400
}
400401
}

docs/advanced-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For example, the following basic configuration means that all commands must have
88

99
```yml
1010
- name: Slash Command Dispatch
11-
uses: peter-evans/slash-command-dispatch@v4
11+
uses: peter-evans/slash-command-dispatch@v5
1212
with:
1313
token: ${{ secrets.PAT }}
1414
commands: |
@@ -38,7 +38,7 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- name: Slash Command Dispatch
41-
uses: peter-evans/slash-command-dispatch@v4
41+
uses: peter-evans/slash-command-dispatch@v5
4242
with:
4343
token: ${{ secrets.PAT }}
4444
config: >
@@ -84,7 +84,7 @@ jobs:
8484
steps:
8585
- uses: actions/checkout@v3
8686
- name: Slash Command Dispatch
87-
uses: peter-evans/slash-command-dispatch@v4
87+
uses: peter-evans/slash-command-dispatch@v5
8888
with:
8989
token: ${{ secrets.PAT }}
9090
config-from-file: .github/slash-command-dispatch.json

docs/examples.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
# Add reaction to the comment
5252
- name: Add reaction
53-
uses: peter-evans/create-or-update-comment@v4
53+
uses: peter-evans/create-or-update-comment@v5
5454
with:
5555
token: ${{ secrets.PAT }}
5656
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -111,7 +111,7 @@ jobs:
111111

112112
# Add reaction to the comment
113113
- name: Add reaction
114-
uses: peter-evans/create-or-update-comment@v4
114+
uses: peter-evans/create-or-update-comment@v5
115115
with:
116116
token: ${{ secrets.PAT }}
117117
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -158,7 +158,7 @@ jobs:
158158
git push
159159
160160
- name: Add reaction
161-
uses: peter-evans/create-or-update-comment@v4
161+
uses: peter-evans/create-or-update-comment@v5
162162
with:
163163
token: ${{ secrets.PAT }}
164164
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -204,7 +204,7 @@ jobs:
204204
git push --force-with-lease
205205
206206
- name: Update comment
207-
uses: peter-evans/create-or-update-comment@v4
207+
uses: peter-evans/create-or-update-comment@v5
208208
with:
209209
token: ${{ secrets.PAT }}
210210
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -218,7 +218,7 @@ jobs:
218218
runs-on: ubuntu-latest
219219
steps:
220220
- name: Update comment
221-
uses: peter-evans/create-or-update-comment@v4
221+
uses: peter-evans/create-or-update-comment@v5
222222
with:
223223
token: ${{ secrets.PAT }}
224224
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -279,7 +279,7 @@ jobs:
279279
git push
280280
281281
- name: Add reaction
282-
uses: peter-evans/create-or-update-comment@v4
282+
uses: peter-evans/create-or-update-comment@v5
283283
with:
284284
token: ${{ secrets.PAT }}
285285
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -301,7 +301,7 @@ jobs:
301301
runs-on: ubuntu-latest
302302
steps:
303303
- name: Update comment
304-
uses: peter-evans/create-or-update-comment@v4
304+
uses: peter-evans/create-or-update-comment@v5
305305
with:
306306
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
307307
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}

docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Follow this guide to get started with a working `/example` command.
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Add reaction
22-
uses: peter-evans/create-or-update-comment@v4
22+
uses: peter-evans/create-or-update-comment@v5
2323
with:
2424
token: ${{ secrets.PAT }}
2525
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
@@ -56,7 +56,7 @@ Command processing setup is complete! Now we need to setup command dispatch for
5656
runs-on: ubuntu-latest
5757
steps:
5858
- name: Slash Command Dispatch
59-
uses: peter-evans/slash-command-dispatch@v4
59+
uses: peter-evans/slash-command-dispatch@v5
6060
with:
6161
token: ${{ secrets.PAT }}
6262
commands: example

docs/updating.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## Updating from `v4` to `v5`
2+
3+
### Breaking changes
4+
5+
- If using self-hosted runners or GitHub Enterprise Server, there are minimum requirements for `v5` to run. See "What's new" below for details.
6+
### What's new
7+
8+
- Updated runtime to Node.js 24
9+
- The action now requires a minimum version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) for the Actions runner. Update self-hosted runners to v2.327.1 or later to ensure compatibility.
10+
111
## Updating from `v3` to `v4`
212

313
### Breaking changes

docs/workflow-dispatch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Slash Command Dispatch
39-
uses: peter-evans/slash-command-dispatch@v4
39+
uses: peter-evans/slash-command-dispatch@v5
4040
with:
4141
token: ${{ secrets.PAT }}
4242
commands: |
@@ -85,7 +85,7 @@ The simplest response is to add a :tada: reaction to the comment.
8585

8686
```yml
8787
- name: Add reaction
88-
uses: peter-evans/create-or-update-comment@v4
88+
uses: peter-evans/create-or-update-comment@v5
8989
with:
9090
token: ${{ secrets.PAT }}
9191
repository: ${{ github.event.inputs.repository }}
@@ -107,7 +107,7 @@ The `error-message` output can be used to provide feedback to the user as follow
107107
```yml
108108
- name: Slash Command Dispatch
109109
id: scd
110-
uses: peter-evans/slash-command-dispatch@v4
110+
uses: peter-evans/slash-command-dispatch@v5
111111
with:
112112
token: ${{ secrets.PAT }}
113113
commands: |
@@ -118,7 +118,7 @@ The `error-message` output can be used to provide feedback to the user as follow
118118
119119
- name: Edit comment with error message
120120
if: steps.scd.outputs.error-message
121-
uses: peter-evans/create-or-update-comment@v4
121+
uses: peter-evans/create-or-update-comment@v5
122122
with:
123123
comment-id: ${{ github.event.comment.id }}
124124
body: |

0 commit comments

Comments
 (0)