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 deprecated set-output action commands #150

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

gsteel
Copy link
Member

@gsteel gsteel commented Nov 14, 2022

actions/core is already at ^1.10 so only the workflows require updating to use the new environment files

Closes #147

`actions/core` is already at `^1.10` so only the workflows require updating to use the new environment files

Signed-off-by: George Steel <george@net-glue.co.uk>
@Ocramius Ocramius added this to the 1.20.0 milestone Nov 14, 2022
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

LGTM, but I don't really know what's going on under the hood :D

Asked for more reviews.

@gsteel
Copy link
Member Author

gsteel commented Nov 14, 2022

Looks to me that all the remaining notices for set-output come from sergeysova/jq-action@v2 - a patch exists for that here: sergeysova/jq-action#9

@samsonasik
Copy link
Member

If there is possibly multiline with some escaping, the change seems needs to be something like:

        run: |
          echo "log<<MESSAGE" >> $GITHUB_OUTPUT
          echo "$(some_data)" >> $GITHUB_OUTPUT
          echo 'MESSAGE' >> $GITHUB_OUTPUT

ref

@gsteel
Copy link
Member Author

gsteel commented Nov 14, 2022

@samsonasik shell-check seems OK with the changed lines - is there something specific that looks wrong? Won't single quotes break the expansions?

@samsonasik
Copy link
Member

@gsteel probably if there is some special chars like in PHPStan, which when combining with multiline, may break the workflow:

Run echo "log=$(git log c2ef009c67198d39a6e685a1bca21ceab798d35b..fec8acc849277c78755d3d00767eff95ed3c4014 --reverse --pretty='%H %s' | sed -e 's/^/https:\/\/github.com\/phpstan\/phpstan-src\/commit\//')" >> $GITHUB_OUTPUT
Error: Unable to process file command 'output' successfully.

ref https://github.com/phpstan/phpstan-src/actions/runs/3320826153/jobs/5487697232#step:6:1

The multiline example is at https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-2

@gsteel
Copy link
Member Author

gsteel commented Nov 14, 2022

Thanks @samsonasik - I understand now! None of the changed lines output multiline. The CI workflow which dumps a load of json is single line too: https://github.com/laminas/laminas-ci-matrix-action/actions/runs/3460149728/jobs/5776368483#step:3:2

Copy link
Member

@samsonasik samsonasik left a comment

Choose a reason for hiding this comment

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

Ok then 👍

@boesing
Copy link
Member

boesing commented Nov 14, 2022

Can only tell that tests seem to run, therefore I guess it works for the continuous-integration plan.
Not sure if it works properly for the tag stuff regarding container creation, no idea how to test that.

Copy link
Member

@internalsystemerror internalsystemerror left a comment

Choose a reason for hiding this comment

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

Not too familiar with the quirks of GHA, but reading through the changelog, everything here is as they suggest so 👍

@Ocramius Ocramius self-assigned this Nov 14, 2022
@Ocramius
Copy link
Member

Nobody presses the bad green button? I'll do it then :P

@Ocramius Ocramius merged commit 6f0c1ba into laminas:1.20.x Nov 14, 2022
@gsteel gsteel deleted the deprecated-set-output branch November 14, 2022 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GHA set-output is deprecated
5 participants