PureDevTools

GitHub Actions Expression Evaluator

Test ${{ }} expressions with custom contexts — preview results before pushing, nothing sent to any server

All processing happens in your browser. No data is sent to any server.

Expression

${{}}
Full:${{ github.ref == 'refs/heads/main' }}

Quick Fill

Expression Examples

Mock Context

Supported Functions Reference

contains(search, item)Check if array/string contains item
startsWith(str, prefix)Check string prefix (case-insensitive)
endsWith(str, suffix)Check string suffix (case-insensitive)
format(str, ...args)Format string with {0}, {1} placeholders
join(arr, sep?)Join array elements with separator
toJSON(value)Convert value to JSON string
fromJSON(str)Parse JSON string to object
hashFiles(paths...)Mock hash of file paths
success()True if job status is success
failure()True if job status is failure
cancelled()True if job was cancelled
always()Always returns true

GitHub Actions expressions (${{ }}) control conditional steps, set outputs, and format strings in your workflows. But testing them requires pushing code and waiting for a workflow run. This tool lets you evaluate expressions locally with custom context values — so you can verify your if: conditions, string functions, and status checks before committing.

What You Can Evaluate

The evaluator supports the full GitHub Actions expression syntax:

Setting Up Contexts

Define custom context values in JSON format to simulate different scenarios:

{
  "github": {
    "event_name": "pull_request",
    "ref": "refs/heads/feature/login",
    "actor": "octocat"
  },
  "env": {
    "NODE_ENV": "production",
    "DEPLOY_TARGET": "staging"
  },
  "steps": {
    "build": {
      "outputs": { "result": "success" },
      "outcome": "success"
    }
  }
}

Then test expressions like:

How to Use

  1. Enter your expression in the expression input (without the ${{ }} wrapper)
  2. Define context values as JSON in the context panel
  3. See the evaluated result instantly
  4. Adjust contexts to test different scenarios

Frequently Asked Questions

Does it support the hashFiles() function? hashFiles() is simulated — it returns a deterministic hash based on the input string. In real GitHub Actions, it hashes actual file contents from the repository.

Can I test matrix expressions? Yes. Define a matrix object in your context JSON (e.g., {"matrix": {"os": "ubuntu-latest", "node": 18}}) and reference it as matrix.os or matrix.node.

How do status functions work here? You can set step outcomes in the context (steps.stepId.outcome) and the status functions will evaluate based on those values. always() always returns true.

Is my expression sent to a server? No. All evaluation runs in your browser using a JavaScript expression parser. No data leaves your device.

What’s the difference between this and the GitHub Actions Validator? The validator checks your entire workflow YAML for structural correctness. This tool focuses on evaluating individual expressions against custom context data.

Related Tools

More Docker & DevOps Tools