[GH-ISSUE #490] Can't access to input variables on 'workflow_dispatch' event #334

Closed
opened 2026-03-01 21:42:27 +03:00 by kerem · 5 comments
Owner

Originally created by @matiasalbarello on GitHub (Jan 19, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/490

I have this action:

name: Simple Task

on:
  workflow_dispatch:
    inputs:
      delay_seconds:
        description: 'Time to delay'
        required: false
        default: 60

jobs:
  simple-task:
    runs-on: ubuntu-latest

    steps:
      - name: delay execution
        env:
          input_delay: ${{ github.event.inputs.delay_seconds }}
        run: sleep $input_delay

      - name: Run a one-line script
        run: echo 'done'

When executing act workflow_dispatch -j simple-task I get the following error:
ERRO[0000] Unable to interpolate string '${{ github.event.inputs.delay_seconds }}' - [TypeError: Cannot access member 'delay_seconds' of undefined]

The workflow works fine on github.

Originally created by @matiasalbarello on GitHub (Jan 19, 2021). Original GitHub issue: https://github.com/nektos/act/issues/490 I have this action: ```yml name: Simple Task on: workflow_dispatch: inputs: delay_seconds: description: 'Time to delay' required: false default: 60 jobs: simple-task: runs-on: ubuntu-latest steps: - name: delay execution env: input_delay: ${{ github.event.inputs.delay_seconds }} run: sleep $input_delay - name: Run a one-line script run: echo 'done' ``` When executing `act workflow_dispatch -j simple-task` I get the following error: `ERRO[0000] Unable to interpolate string '${{ github.event.inputs.delay_seconds }}' - [TypeError: Cannot access member 'delay_seconds' of undefined]` The workflow works fine on github.
kerem 2026-03-01 21:42:27 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@pauliusm commented on GitHub (Jan 22, 2021):

Looks like same as https://github.com/nektos/act/issues/295

<!-- gh-comment-id:765551988 --> @pauliusm commented on GitHub (Jan 22, 2021): Looks like same as https://github.com/nektos/act/issues/295
Author
Owner

@github-actions[bot] commented on GitHub (Feb 22, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:782961091 --> @github-actions[bot] commented on GitHub (Feb 22, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@benc-uk commented on GitHub (Mar 23, 2021):

Any workaround for this?

I've tried adding a JSON payload like this

{
  "workflow_dispatch": {
    "inputs": {
      "IMAGE_TAG": "dev-1"
    }
  }
}

It doesn't work

<!-- gh-comment-id:804814010 --> @benc-uk commented on GitHub (Mar 23, 2021): Any workaround for this? I've tried adding a JSON payload like this ```json { "workflow_dispatch": { "inputs": { "IMAGE_TAG": "dev-1" } } } ``` It doesn't work
Author
Owner

@benc-uk commented on GitHub (Mar 23, 2021):

Ahhh got it working with simply

{
  "inputs": {
    "IMAGE_TAG": "latest"
  }
}

The docs/README are a little unclear on how to format the JSON, it's implied from the provided example, that the top level keys are the event types, but this isnt the case

<!-- gh-comment-id:805113491 --> @benc-uk commented on GitHub (Mar 23, 2021): Ahhh got it working with simply ```json { "inputs": { "IMAGE_TAG": "latest" } } ``` The docs/README are a little unclear on how to format the JSON, it's implied from the provided example, that the top level keys are the event types, but this isnt the case
Author
Owner

@ryuheechul commented on GitHub (Jul 2, 2021):

@benc-uk Thanks for your comment and I agree with you. This should be either fixed to work like other events or this exception should be clearly stated in README because this behaviour wasn't inferable for me by reading https://github.com/nektos/act#events

<!-- gh-comment-id:872871665 --> @ryuheechul commented on GitHub (Jul 2, 2021): @benc-uk Thanks for your comment and I agree with you. This should be either fixed to work like other events or this exception should be clearly stated in README because this behaviour wasn't inferable for me by reading https://github.com/nektos/act#events
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#334
No description provided.