Skip to content

Pass secrets to SSH command #28

@alexandrubau

Description

@alexandrubau

How can I pass secrets to the SSH command?
Running the following command doesn't output MY_SECRET as an environment variable.

Thanks

- name: Start container services
   uses: garygrossgarten/github-action-ssh@release
   env:
     MY_SECRET: ${{ secrets.MY_SECRET }}
   with:
     host: ${{ steps.tf_out.outputs.vm_ip }}
     username: terraform
     privateKey: ${{ secrets.TF_KEY }}
     command: |
       printenv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions