Open lamhktommy opened 4 months ago
Describe the bug Reusable workflow cannot get inputs passed from a main workflow
To Reproduce Steps to reproduce the behavior:
dev/action.yml
name: Reusable workflow on: workflow_dispatch: inputs: source-environment: required: true type: string workflow_call: inputs: source-environment: required: true type: string jobs: build-and-push: name: Build and Push runs-on: ubuntu-latest environment: name: ${{ inputs.source-environment }} secrets: inherit steps: - run: echo "${{ inputs.source-environment }}" shell: bash
_mainworkflow.yml
jobs: action-dev: if: github.ref == 'refs/heads/main' environment: develop name: Deploy to Dev runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Reuse action uses: ./.github/actions/dev with: source-environment: develop
I have tried to use github.event.inputs.source-environment as well and also doesn't work
github.event.inputs.source-environment
Expected behavior Expect develop is output in the console
ubuntu-latest
Unrecognized named-value: 'inputs'
Describe the bug Reusable workflow cannot get inputs passed from a main workflow
To Reproduce Steps to reproduce the behavior:
dev/action.yml
_mainworkflow.yml
I have tried to use
github.event.inputs.source-environment
as well and also doesn't workExpected behavior Expect develop is output in the console
Runner Version and Platform
ubuntu-latest
What's not working?
Unrecognized named-value: 'inputs'