[GH-ISSUE #6006] Support case expression #1316

Open
opened 2026-03-01 21:50:19 +03:00 by kerem · 0 comments
Owner

Originally created by @wd-hopkins on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/nektos/act/issues/6006

Bug report info

act version: 0.2.84

Command used with act

act -W .github/workflows/test-expressions.yml -P ubuntu-latest=node:16-buster-slim

Describe issue

GitHub Actions expressions now support a case function which can perform true logical operations. https://github.blog/changelog/2026-01-29-github-actions-smarter-editing-clearer-debugging-and-a-new-case-function/

No response

Workflow content

name: example

on:
  push:

jobs:
  main:
    runs-on: ubuntu-latest
    env:
      TEST: ${{ case(github.event_name == 'workflow_dispatch', 'dispatch', 'other') }}
    steps:
      - name: Run a one-line script
        run: echo $TEST

Relevant log output

Error: workflow is not valid. 'test-expressions.yml': Line: 8 Column 5: Failed to match job-factory: Line: 10 Column 13: Unknown Function Call case
Line: 8 Column 5: Failed to match workflow-job: Line: 8 Column 5: Unknown Property runs-on
Line: 9 Column 5: Unknown Property env
Line: 11 Column 5: Unknown Property steps
Actions YAML Schema Validation Error detected:
For more information, see: https://nektosact.com/usage/schema.html
exit status 1

Additional information

No response

Originally created by @wd-hopkins on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/nektos/act/issues/6006 ### Bug report info ```plain text act version: 0.2.84 ``` ### Command used with act ```sh act -W .github/workflows/test-expressions.yml -P ubuntu-latest=node:16-buster-slim ``` ### Describe issue GitHub Actions expressions now support a case function which can perform true logical operations. https://github.blog/changelog/2026-01-29-github-actions-smarter-editing-clearer-debugging-and-a-new-case-function/ ### Link to GitHub repository _No response_ ### Workflow content ```yml name: example on: push: jobs: main: runs-on: ubuntu-latest env: TEST: ${{ case(github.event_name == 'workflow_dispatch', 'dispatch', 'other') }} steps: - name: Run a one-line script run: echo $TEST ``` ### Relevant log output ```sh Error: workflow is not valid. 'test-expressions.yml': Line: 8 Column 5: Failed to match job-factory: Line: 10 Column 13: Unknown Function Call case Line: 8 Column 5: Failed to match workflow-job: Line: 8 Column 5: Unknown Property runs-on Line: 9 Column 5: Unknown Property env Line: 11 Column 5: Unknown Property steps Actions YAML Schema Validation Error detected: For more information, see: https://nektosact.com/usage/schema.html exit status 1 ``` ### Additional information _No response_
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1316
No description provided.