Skip to content

Commit 2fb6eca

Browse files
ci: Fix imports in 'actions/github-script' (#3626)
1 parent fdc3555 commit 2fb6eca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/cmd-publish-pr-on-npm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
uses: actions/github-script@v6
6969
with:
7070
script: |
71-
import fs from 'node:fs';
72-
import assert from 'node:assert';
71+
const fs = require('node:fs');
72+
const assert = require('node:assert');
7373
7474
const pull_request = JSON.parse(process.env.PULL_REQUEST_JSON);
7575
const packageJSONPath = './npmDist/package.json';

.github/workflows/cmd-run-benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/github-script@v6
4040
with:
4141
script: |
42-
import fs from 'node:fs';
42+
const fs = require('node:fs');
4343
4444
// GH doesn't expose job's id so we need to get it through API, see
4545
// https://github.community/t/job-id-is-string-in-github-job-but-integer-in-actions-api/139060

.github/workflows/github-actions-bot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/github-script@v6
3838
with:
3939
script: |
40-
import fs from 'node:fs';
40+
const fs = require('node:fs');
4141
4242
const event = JSON.parse(fs.readFileSync('./event.json', 'utf8'));
4343
await github.rest.issues.createComment({
@@ -110,7 +110,7 @@ jobs:
110110
uses: actions/github-script@v6
111111
with:
112112
script: |
113-
import fs from 'node:fs';
113+
const fs = require('node:fs');
114114
115115
const needs = JSON.parse(process.env.NEEDS);
116116
@@ -134,7 +134,7 @@ jobs:
134134
uses: actions/github-script@v6
135135
with:
136136
script: |
137-
import fs from 'node:fs';
137+
const fs = require('node:fs');
138138
139139
const replyMessage = fs.readFileSync('./replyMessage.txt', 'utf-8');
140140
const { issue, comment, sender } = context.payload;

0 commit comments

Comments
 (0)