Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use $GITHUB_OUTPUT instead set-output(deprecated) #37

Merged
merged 2 commits into from Nov 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 16 additions & 4 deletions entrypoint.sh
Expand Up @@ -73,7 +73,19 @@ NETLIFY_PREVIEW_URL=$(echo "$OUTPUT" | grep -Eo '(http|https)://[a-zA-Z0-9./?=_-
NETLIFY_LOGS_URL=$(echo "$OUTPUT" | grep -Eo '(http|https)://app.netlify.com/[a-zA-Z0-9./?=_-]*') #Unique key: app.netlify.com
NETLIFY_LIVE_URL=$(echo "$OUTPUT" | grep -Eo '(http|https)://[a-zA-Z0-9./?=_-]*' | grep -Eov "netlify.com") #Unique key: don't containr -- and app.netlify.com

echo "::set-output name=NETLIFY_OUTPUT::$NETLIFY_OUTPUT"
echo "::set-output name=NETLIFY_PREVIEW_URL::$NETLIFY_PREVIEW_URL"
echo "::set-output name=NETLIFY_LOGS_URL::$NETLIFY_LOGS_URL"
echo "::set-output name=NETLIFY_LIVE_URL::$NETLIFY_LIVE_URL"

echo "NETLIFY_OUTPUT<<EOF" >> $GITHUB_OUTPUT
echo "$NETLIFY_OUTPUT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo "NETLIFY_PREVIEW_URL<<EOF" >> $GITHUB_OUTPUT
echo "$NETLIFY_PREVIEW_URL" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo "NETLIFY_LOGS_URL<<EOF" >> $GITHUB_OUTPUT
echo "$NETLIFY_LOGS_URL" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo "NETLIFY_LIVE_URL<<EOF" >> $GITHUB_OUTPUT
echo "$NETLIFY_LIVE_URL" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these are single line outputs I believe we could use the simpler one-line syntax
ex:

echo "action_state=yellow" >> $GITHUB_ENV

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes @jsmrcaga, thank you for the review!
you can check again