Skip to content

Commit c09179c

Browse files
committed
feat: adding output. updating action yaml
1 parent 2fbf1a3 commit c09179c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

action.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
name: "Hello World"
2-
description: "Greet someone and record the time"
1+
name: "Wait for Netlify"
2+
description: "Wait for Netlify Deploy Preview to complete"
33
inputs:
4-
who-to-greet: # id of input
5-
description: "Who to greet"
4+
site_name:
5+
description: "The Netlify site name to test against"
66
required: true
7-
default: "World"
7+
max_timeout:
8+
description: "The max time to run the action"
9+
required: false
810
outputs:
9-
time: # id of output
10-
description: "The time we greeted you"
11+
url:
12+
description: "The fully qualified deploy preview URL"
1113
runs:
1214
using: "node12"
1315
main: "index.js"

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const run = async () => {
3030
core.setFailed("Required field `site_name` was not provided");
3131
}
3232
const url = `https://deploy-preview-${PR_NUMBER}--${siteName}.netlify.com`;
33+
core.setOutput("url", url);
3334
console.log(`Waiting for a 200 from: ${url}`);
3435
await waitForUrl(url, MAX_TIMEOUT);
3536
} catch (error) {

0 commit comments

Comments
 (0)