Can't get Inputs variables on workflow_dispatch task

Hello,

From my task, I can’t get the value of an inputs variable setted by default on a workflow_dispatch.


name: ‘Test’

on:
workflow_dispatch:
inputs:
deploy_target:
required: true
default: ‘Test’
type: string

push:
branches:
- feature/myBranch

jobs:

print-env:
runs-on: ubuntu-latest
environment: test
steps:
- name: Print env
env:
myEnv: ${{ github.event.inputs.deploy_target }}
run: echo The env is $myEnv

Is someone has an idea why it is not working?

Regards

What happens if you just do a

run: echo The env is ${{ github.event.inputs.deploy_target}}

and remove the environment section?

Ok but it same result:

image

Maybe it is not working as I am on a fetaure branch, and the code is not yet in main branch.

=> like to manually trigger workflow work only if the code is in master