Skip to content

Incomplete example for GitHub action integration #49

@auumai-mattia

Description

@auumai-mattia

The documentation mentions it is possible to use the env provider to read secrets in a Github action workflow.

When trying to run a job step in a devenv like this:

 - name: Build API Docker Image via devenv
   shell: devenv shell bash -- -e {0}
   run: secretspec run --provider env -- build-api-image

where I've loaded environment variables in a previous step, I keep encountering an error:

Error:   × No provider backend configured.
  │ 
  │ To fix this, either:
  │   1. Run 'secretspec config init' to set up your default provider
  │   2. Use --provider flag (e.g., 'secretspec check --provider keyring')

I have also tried using a different provider, but it still complaints about a missing secretspec configuration. None of the documentation contains details on how to add this configuration during a GitHub action. I tried manually writing a simple .toml file during the Github action, but this didn't seem to work either.

Would be great if the documentation highlights what the right approach to do here is. Obviously, running the secretspec config init command can't be done because it is interactive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions