-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Property value contains brackets #6
Comments
Is it perhaps returning the prop value as string instead of parsed now? (@jan-cerny you could attempt |
It seems to work. Let's see how it goes: ComplianceAsCode/content@5ffe39f |
After the version 0.1.20 of the
notiz-dev/github-action-json-property
action has been released, we experience a different behavior of the.prop
property which causes our CI jobs to fail. The value returned by this property now contains brackets[
and]
which weren't there with the previous version.An example of a workflow affected by this change is https://github.com/ComplianceAsCode/content/blob/master/.github/workflows/automatus-cs9.yaml
In our workflow, we have a JSON
output.json
that can look for example like this:Then, we have a step that is using
notiz-dev/github-action-json-property
:Then, we use this step in another step in a
run
command as${{join(steps.rules.outputs.prop)}}
.Previously, the string returned by
${{join(steps.rules.outputs.prop)}}
didn't contain[
and]
.For example, in the job https://github.com/ComplianceAsCode/content/actions/runs/3036087676/jobs/4887043536 for the JSON
{"rules": ["accounts_umask_etc_profile"], "product": "rhel8", "bash": "False", "ansible": "True"}
it returnedaccounts_umask_etc_profile
.After the update, the format changes and looks like the raw JSON with
[
and]
and quotes.For example, in the job https://github.com/ComplianceAsCode/content/actions/runs/3418678327/jobs/5691495274 for the JSON
{"rules": ["accounts_passwords_pam_faillock_dir"], "product": "rhel8", "bash": "True", "ansible": "True"}
it returned["accounts_passwords_pam_faillock_dir"]
.For this moment, we have fixed this by using the older version v0.1.0 explicitly in our GH actions workflows.
But what would be the proper fix? Should we use the output in a different way? Or can it be a bug in your tool?
Thanks for any advice.
The text was updated successfully, but these errors were encountered: