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

Switch to the new method of setting outputs #16

Merged
merged 3 commits into from
Oct 18, 2022
Merged

Conversation

DuncSmith
Copy link
Contributor

Part of fac/dev-platform#1271

Before:

echo "::set-output name=output_var::${output_string}"

After:

echo "output_var=${output_string}" >> "$GITHUB_OUTPUT"

Also now supports multiple outputs at once:

{
  echo "output_var_1=${output_string_2}"
  echo "output_var_2=${output_string_2}"
  echo "output_var_3=${output_string_3}"
} >> "$GITHUB_OUTPUT"

Copy link
Contributor

@dmorgan-fa dmorgan-fa left a comment

Choose a reason for hiding this comment

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

I'm 100% not sure if this script will have access to the env var $GITHUB_OUTPUT. I'm assuming it's been exported and passed down through the subshells, but I

@@ -84,7 +84,7 @@ if ! gem push --key="$KEY" --host "$GEM_HOST" "$GEM_FILE" >push.out; then
exit $gemerr
fi

echo "::set-output name=pushed-version::$( parse-gemspec --version )"
echo "pushed-version=$(parse-gemspec --version)" >> "$GITHUB_OUTPUT"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm 100% not sure if this script will have access to the env var $GITHUB_OUTPUT. I'm assuming it's been exported at the workflow level and therefore passed down through the subshells, but worth testing before rolling this out and bumping versions.

Copy link
Member

@dgholz dgholz Oct 17, 2022

Choose a reason for hiding this comment

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

It does have access to it. But also: this is still calling it like "[...] $( parse-gemspec ) [...]", so if it was working before, it will keep working

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Composite actions do have access, but you're defo right that it should be tested

@DuncSmith
Copy link
Contributor Author

Tested ok via devkit pre-release
image

@DuncSmith DuncSmith merged commit 9932e82 into v2 Oct 18, 2022
@DuncSmith DuncSmith deleted the github-output-syntax branch October 18, 2022 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants