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

Remove use of set-output in workflows #45357

Merged
merged 5 commits into from
Nov 7, 2022
Merged

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Oct 27, 2022

What?

Remove the use of set-output commands.

Why?

This command has been deprecated and will be removed in the near future.

For more information, see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/.

This command has been deprecated and will be removed in the near future.

For more information, see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/.
@desrosj desrosj self-assigned this Oct 27, 2022
@codesandbox
Copy link

codesandbox bot commented Oct 27, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

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

@desrosj A few thoughts below.

For the future, these GitHub Workflows should be done differently. Instead of writing a bunch of shell in a run: | statement, it should be moved in to a real #!/bin/bash script. Then other code quality tools such as Shellcheck could be used. Could put all the scripts in .github/scripts. Just something to think about as Gutenberg, Core, and other projects keep using GH Actions.

.github/workflows/build-plugin-zip.yml Outdated Show resolved Hide resolved
.github/workflows/build-plugin-zip.yml Outdated Show resolved Hide resolved
.github/workflows/build-plugin-zip.yml Outdated Show resolved Hide resolved
.github/workflows/upload-release-to-plugin-repo.yml Outdated Show resolved Hide resolved
@alexstine alexstine added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 29, 2022
desrosj and others added 4 commits November 4, 2022 09:56
Co-authored-by: Alex Stine <[email protected]>
Co-authored-by: Alex Stine <[email protected]>
Co-authored-by: Alex Stine <[email protected]>
Co-authored-by: Alex Stine <[email protected]>
@desrosj
Copy link
Contributor Author

desrosj commented Nov 4, 2022

Thanks for the review, @alexstine! I made adjustments.

For the future, these GitHub Workflows should be done differently. Instead of writing a bunch of shell in a run: | statement, it should be moved in to a real #!/bin/bash script. Then other code quality tools such as Shellcheck could be used. Could put all the scripts in .github/scripts. Just something to think about as Gutenberg, Core, and other projects keep using GH Actions.

I do agree with moving to real scripts when they span more than a few lines. But I think that separating them into script files could be more confusing in some cases, especially when jobs have multiple steps running bash commands. In general, I think we should try to move towards more atomic steps that perform one operation in our workflows to simplify things as much as possible. It makes it more clear where problems occur, and makes it easier to debug issues.

Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

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

LGTM.

@desrosj desrosj merged commit 2251a58 into trunk Nov 7, 2022
@desrosj desrosj deleted the update/gha-set-output-deprecated branch November 7, 2022 15:59
@github-actions github-actions bot added this to the Gutenberg 14.6 milestone Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants