We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
One example job in the GitHub Actions documentation uses toJson and it works when run on GitHub, but not when run by act.
toJson
act
jobs: test: runs-on: ubuntu-latest steps: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT"
runs fine on GitHub, but act complains:
[test/test] ⭐ Run Dump GitHub context ERRO[0001] Unable to interpolate string '${{ toJson(github) }}' - [ReferenceError: 'toJson' is not defined] | ${{ toJson(github) }}
The text was updated successfully, but these errors were encountered:
Looks like i was confused by the docs since the example they provided had:
toJSON(job) might return { "status": "Success" }
Should be a quick fix here: https://github.com/nektos/act/blob/master/pkg/runner/expression.go#L169
Sorry, something went wrong.
@cplee It probably changed during development. I suggest you support both toJSON and toJson. Thanks for the quick turnaround!
toJSON
fix #115 - support toJson and toJSON
b1d1d32
e9de6ca
Will be included in next release.
No branches or pull requests
One example job in the GitHub Actions documentation uses
toJson
and it works when run on GitHub, but not when run byact
.runs fine on GitHub, but
act
complains:The text was updated successfully, but these errors were encountered: