Skip to content

Commit 6e21438

Browse files
committed
use gh workspace for config files
1 parent 285046b commit 6e21438

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const WPT_API_KEY = core.getInput('apiKey');
1111
const WPT_URLS = core.getInput('urls').split("\n");
1212
const WPT_LABEL = core.getInput('label');
1313
const GITHUB_TOKEN = core.getInput('GITHUB_TOKEN');
14+
const DIRECTORY = process.env.GITHUB_WORKSPACE;
1415
const GH_EVENT_NAME = process.env.GITHUB_EVENT_NAME;
1516
const METRICS = {
1617
"TTFB": "Time to First Byte",
@@ -106,7 +107,7 @@ async function run() {
106107
"timeout": 240
107108
}
108109
if (WPT_OPTIONS) {
109-
let settings = require(WPT_OPTIONS);
110+
let settings = require(`${DIRECTORY}/${WPT_OPTIONS}`);
110111
if (typeof settings === 'object' && settings !== null) {
111112
core.debug(settings);
112113
options = {
@@ -119,7 +120,7 @@ async function run() {
119120

120121
}
121122
if (WPT_BUDGET) {
122-
options.specs = require(WPT_BUDGET);
123+
options.specs = require(`${DIRECTORY}/${WPT_BUDGET}`);
123124
}
124125
if (WPT_LABEL) {
125126
options.label = WPT_LABEL;

0 commit comments

Comments
 (0)