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 print outputs step in existing workflows #859

Merged
merged 1 commit into from
Dec 13, 2022
Merged

fix print outputs step in existing workflows #859

merged 1 commit into from
Dec 13, 2022

Conversation

irega
Copy link
Contributor

@irega irega commented Oct 26, 2022

Changes

  • Use format and toJSON expressions to fix the Print outputs which is causing the current workflows failing.

Context

The current workflows are failing in the repo, they are stuck in the Print outputs step. After debugging them using act, I realized the outputs were printed wrong, repeating all the properties from each array element over and over again, such as:

[operations:{_operationsConsumed:4},operations:{_operationsConsumed:4}] 
[operations:{_operationsConsumed:4},_options:repoToken:***] 
[operations:{_operationsConsumed:4},_options:staleIssueMessage:This issue is stale] 
[operations:{_operationsConsumed:4},_options:stalePrMessage:This PR is stale] 
[operations:{_operationsConsumed:4},_options:closeIssueMessage:] 
[operations:{_operationsConsumed:4},_options:closePrMessage:] 
...

The error is more notorious now and causes the workflows failing due to we have more staled/closed issues and pull requests in the repo.

Using the toJSON expression to get a pretty-print JSON representation for each output fixes the problem.

@irega irega changed the title Fix output fix print outputs step @irega Oct 26, 2022
@irega irega changed the title fix print outputs step @irega fix print outputs step Oct 26, 2022
@irega irega changed the title fix print outputs step fix print outputs step in existing workflows Oct 26, 2022
@irega irega marked this pull request as ready for review October 26, 2022 10:00
@irega irega requested a review from a team as a code owner October 26, 2022 10:00
@irega irega mentioned this pull request Oct 26, 2022
@irega
Copy link
Contributor Author

irega commented Oct 26, 2022

@luketomlinson @rentziass @flaxel @JoannaaKL could you take a look at this PR? 🙏

@irega
Copy link
Contributor Author

irega commented Nov 7, 2022

@luketomlinson @rentziass @JoannaaKL friendly ping 😄 I think I need one more approval to merge

@krzema12
Copy link

@luketomlinson @rentziass @JoannaaKL friendly ping.

1 similar comment
@sorodrigo
Copy link

@luketomlinson @rentziass @JoannaaKL friendly ping.

@irega
Copy link
Contributor Author

irega commented Dec 13, 2022

Copy link
Contributor

@e-korolevskii e-korolevskii left a comment

Choose a reason for hiding this comment

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

LGTM!

@irega
Copy link
Contributor Author

irega commented Dec 13, 2022

LGTM!

Thank you @e-korolevskii! it seems I don't have the required permissions to merge the PR, who could do it?

cc @luketomlinson @rentziass @JoannaaKL @pje @marko-zivic-93

Copy link
Contributor

@JoannaaKL JoannaaKL left a comment

Choose a reason for hiding this comment

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

Looks good, thank you for fixing! :)

@JoannaaKL JoannaaKL merged commit 627cef3 into actions:main Dec 13, 2022
@irega irega deleted the fix-output branch December 13, 2022 14:50
@irega irega mentioned this pull request Dec 13, 2022
1 task
davorpa added a commit to davorpa/free-programming-books that referenced this pull request Feb 22, 2023
eshellman pushed a commit to EbookFoundation/free-programming-books that referenced this pull request Feb 23, 2023
…9287)

* security: `set-output` cmd deprecated. Use `$GITHUB_OUTPUT` env file

To avoid untrusted logged data to use `save-state` and `set-output` workflow commands without the intention of the workflow author we have introduced a new set of environment files to manage state and output.

Starting 1st June 2023 workflows using `save-state` or `set-output` commands via stdout will fail with an error.

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

* chore: apply fix found at actions/stale#859

* test: fixing report escapes

* test: fixing report escapes

* test: fixing report escapes

* test: fixing report escapes

* test: fixing report escapes
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.

6 participants