01What is GitHub Actions Expression Evaluator?
GitHub Actions decides whether a step or job runs by evaluating its if: condition, and it fills in ${{ }} placeholders the same way. Getting these wrong usually means a push, a wait and a skipped step. This tool evaluates the expression in your browser against contexts you edit as JSON, so you can try a condition before committing it. The evaluator follows the rules on GitHub's expressions reference page. Literals can be booleans, null, numbers (including hex and exponent forms) and single-quoted strings, where two single quotes stand for one. Double quotes are rejected, as GitHub rejects them. String comparisons ignore case. When == compares values of different types, both sides are converted to numbers: null becomes 0, true becomes 1, an empty string becomes 0, and other strings become NaN unless they parse as a number. Arrays and objects are equal only to themselves. Any relational comparison involving NaN is false. The && and || operators return one of their operands, not a plain boolean. Context and property names are matched without regard to case. The supported functions are contains, startsWith, endsWith, format (with {{ and }} escapes), join, toJSON and fromJSON, plus the status functions success, failure, cancelled and always. Pick the job status from the menu to see how status functions behave. In if: mode, a condition with no status function is treated as success() && (your condition), which is what GitHub does. Object filters such as labels.*.name return an array of the matching values. In value mode, text with several ${{ }} blocks is filled in piece by piece, like a run: line. A worked example: with the sample contexts, contains(github.event.pull_request.labels.*.name, 'deploy') returns true, because the filter yields ["bug", "deploy"]. Switch the job status to failure and the plain condition github.event_name == 'pull_request' turns false. No status function was used, so the implied success() fails. Adding failure() && in front changes that. There are limits. hashFiles needs a runner workspace, so it reports an error here. The docs do not list operator precedence; this tool uses the order from the open source runner parser, recalled rather than checked against a page (! first, then comparisons, then ==, then &&, then ||), so add parentheses when it matters. Contexts are sample data, not the real values your runner will see.
Developers and DevOps engineers who write GitHub Actions workflows and want to check conditions without waiting for a run. The tool runs entirely in your browser, so your data never leaves your device.
02How to use GitHub Actions Expression Evaluator
- Type or paste the expression, with or without the ${{ }} wrapper
- Choose if: condition mode or value mode
- Pick the job status so far to test success(), failure() and cancelled()
- Edit the contexts JSON so it matches the event you care about
- Read the result, its type and whether the step would run
03Worked examples
- Input:
contains(github.event.pull_request.labels.*.name, 'deploy') - Result:
true - The sample labels are bug and deploy; the filter alone returns ["bug", "deploy"].
- Input:
github.event_name == 'pull_request' (if: mode, job status: failure) - Result:
false - No status function, so success() is added implicitly.
- Input:
failure() && github.ref == 'refs/heads/main' (if: mode, job status: failure) - Result:
true - Input:
github.ref == "refs/heads/main" - Result:
Error: Double quotes are not allowed at position 15; use single quotes - Input:
format('Hello {0} {1} {{2}}', 'Mona', 'the') - Result:
Hello Mona the {2} - Input:
Release v${{ steps.build.outputs.version }} on ${{ matrix.os }} (value mode) - Result:
Release v1.2.0 on ubuntu-latest - Each ${{ }} block is replaced with its string value.
04Common use cases
- Checking an if: condition before pushing a workflow change
- Seeing why a step after a failure was skipped and adding failure() correctly
- Comparing a step output as a number with fromJSON
- Testing contains() against pull request label names with an object filter
- Previewing the string a format() call or ${{ }} interpolation will produce
- Finding the double-quoted string that makes a workflow fail to load
05Tips
- Step outputs are always strings, so wrap them in fromJSON() before comparing with >
- Comparing two strings with >= is a case-insensitive text comparison, so '100' >= '80' is false
- A step that should run after a failure still needs failure() or always() in its condition
- Prefer !cancelled() over always() for steps you want to skip when a run is cancelled
- Use parentheses when you mix && and || so the grouping is clear to readers too
06Related concepts
GitHub Actions contexts, if conditional, status check functions, object filter, type coercion.
Frequently Asked Questions
What is GitHub Actions Expression Evaluator?
GitHub Actions Expression Evaluator is a free, browser-based developer tool on AIDToolStack. Test GitHub Actions expressions and if: conditions in your browser. Edit github, env, steps, needs and matrix contexts and see the result. It requires no installation or sign-up and works entirely in your browser.
Is GitHub Actions Expression Evaluator free to use?
Yes. No sign-up, no fees and no usage cap.
Does GitHub Actions Expression Evaluator store my data?
No. It runs in your browser; nothing is uploaded.