`install_components` must be a comma-separated string, not a list

This issue has been tracked since 2022-01-08.

TL;DR

The readme states that install_components should be a "List of Cloud SDK components to install" but it appears that a comma-separated string is expected rather than a list.

Expected behavior

I would expect to be able to use a YAML list to specify the install_components input.

Observed behavior

If a YAML list is used to specify the install_components input such as install_components: [beta, cloud-datastore-emulator], the following error is produced:

The workflow is not valid. .github/workflows/test.yaml (Line: 17, Col: 9): A sequence was not expected

But using a comma-separated string such as install_components: beta, cloud-datastore-emulator works.

Action YAML

name: Test
on: [push]
jobs:
  test:
    runs-on: ubuntu-20.04
    steps:
    - name: Set up Cloud SDK
      uses: google-github-actions/[email protected]
      with:
        install_components:
        - beta
        - cloud-datastore-emulator

Additional information

Perhaps this is expected behavior, but if so it seems to contradict what's written in the readme.

sethvargo wrote this answer on 2022-01-08

I don't think GitHub Actions allows for anything other than a string unfortunately. We need to update the docs on this.

Ido-Ozeri wrote this answer on 2022-02-01

I was also baffled with the input convention for install_components and the documentation is very obscure about it. An example of more than 1 component would be highly appreciated in the docs and could prevent future confusion.

mattwelke wrote this answer on 2022-02-07

Example in the docs is good. Started using this action today. How to install components was clear to me. I'm having an issue using my installed component (pubsub emulator) but that's another issue.

More Details About Repo
Owner Name google-github-actions
Repo Name setup-gcloud
Full Name google-github-actions/setup-gcloud
Language TypeScript
Created Date 2019-11-05
Updated Date 2023-03-23
Star Count 1505
Watcher Count 65
Fork Count 548
Issue Count 11

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date