pietrobolcato / action-read-yaml

Custom github action used to read yaml files, supporting multiple keys and variable replacements
10 stars 18 forks source link

Unable to print an array value #8

Open bh3r1th opened 11 months ago

bh3r1th commented 11 months ago

My input YAML file has these values.

domain_name: domain
env_name: dev
dataset_id: ["dataset_name1", "dataset_name2"]

This code is printing an empty value for dataset_id

- name: Read YAML file
        id: read-yaml-file
        uses: pietrobolcato/action-read-yaml@1.1.0
        with:
          config: ${{ github.workspace }}/${{ steps.run_git_diff.outputs.file_name }}
      - name: Get dataset name
        id: get_ds_name
        run: |
          echo "dataset_id=${{ steps.read-yaml-file.outputs['dataset_id'] }}"

Can someone tell me why?

iamroddo commented 11 months ago

I'm seeing something similar. The action can read a scalar variable in YAML but not a dict.

fcatacut commented 8 months ago

This should be fixed by #6. You would be able to access this using dataset_id.array.