Job matrix strategy based on file content

I have a chart.yaml file with a list of Helm Charts


charts:

- name: app-one

  version: 0.1.1

  repository: helmrepo.azurecr.io 

- name: app-two

  version: 0.1.1

  repository: helmrepo.azurecr.io   

- name: app-three

  version: 0.1.1

  repository: helmrepo.azurecr.io

I want to loop thru the chart.yaml and deploy each CHart how best to achieve this.

I’m not sure the best approach. I’m thinking a strategy.matrix


name: Pipeline

on:

  workflow_dispatch:

jobs:

  deploy:

    runs-on: ubuntu-latest

    strategy:

      matrix:
       max-parallel: 1
       fail-fast: true
       ## ???? run deploy steps for each chart

    steps:

      - name: Azure Login

        run: echo "Azure Login"

      - name: AKS set context

        run: echo "AKS set context"        

      - name: Deploy Chart

        env:

          CHART_NAME: ${{ matrix.name }}

          CHART_VERSION: ${{ matrix.version }}

        run: echo "Deploying Chart - $CHART_NAME $CHART_VERSION"