How to run matrix of docker container images?

i’m trying to create a generic action.yml that can execute different docker containers based on an input parameter. it fails on the image: ${{dockerfile}} line with this error: /..././.github/actions/generic/action.yml (Line: 28, Col: 10): Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.dockerfile. it doesn’t matter whether the image line is quoted or not.

i’d like to create a set of docker images and have the workflow execute a matrix of [alpine-3.9, alpine-3.10, centos-7, etc.]. how can i best accomplish that?

# action.yml
name: 'run tests in dockerfile'
description: 'install bindings and run tests on dockerfile'
inputs:
  dockerfile:
    description: 'which dockerfile to use'
    required: true
  branch-to-test:  # id of input
    description: 'which branch in the repo should be tested'
    required: true
    default: 'master'
  ao-token-prod:
    description: 'appoptics token valid in production environment'
    required: true
outputs:
  install-prod:
    description: 'production installation result'
  install-dev:
    description: 'development installation result'
  tests-passed-count:
    description: 'number of tests that succeeded'
  tests-failed-count:
    description: 'number of tests that failed'
  tests-failed:
    description: 'tests that failed'
runs:
  using: 'docker'
  image: ${{inputs.dockerfile}}.Dockerfile
  args:
    - ${{inputs.branch-to-test}}
    - ${{inputs.ao-token-prod}}