Skip to content

unable to inject shell to composite action #835

@igagis

Description

@igagis

Describe the bug
Unable to pass the shell via input parameter to the composite action.

To Reproduce
Steps to reproduce the behavior:

  1. create following composite action:
name: 'test actions'
description: 'test action description'
inputs:
  shell:
    description: 'shell to use'
    required: false
    default: bash
runs:
  using: "composite"
  steps:
    - name:
      run: echo "bla bla bla"
      shell: ${{ inputs.shell}}
  1. use the action in some workflow
  2. Job fails on the 'Set up job' phase, printing the following errors:
Current runner version: '2.274.2'
Operating System
Virtual Environment
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'msys2/setup-msys2@v2'
Download action repository 'actions/checkout@main'
Download action repository 'myci-actions/add-pacman-repo@master'
Error: myci-actions\add-pacman-repo\master\action.yml (Line: 25, Col: 14):
Error: myci-actions\add-pacman-repo\master\action.yml (Line: 25, Col: 14): Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.shell
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. myci-actions\add-pacman-repo\master\action.yml (Line: 25, Col: 14): Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.shell
   at GitHub.DistributedTask.ObjectTemplating.TemplateValidationErrors.Check()
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String f[...]
Error: Fail to load myci-actions\add-pacman-repo\master\action.yml

where (Line: 25, Col: 14) corresponds to the last line of the action from step 1. I.e. shell: ${{ inputs.shell}}

Expected behavior
The action works fine and uses the shell passed in as input argument to the action.

Runner Version and Platform

windows-latest

Metadata

Metadata

Assignees

Labels

Runner BugBug fix scope to the runnerbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions