ci-id

Crates.ioci-id
lib.rsci-id
version0.2.1
sourcesrc
created_at2024-10-29 16:14:53.637841
updated_at2024-11-05 10:09:02.163548
descriptionAmbient OIDC credentials detection on CI systems
homepage
repositoryhttps://github.com/jku/ci-id
max_upload_size
id1427184
size38,252
Jussi Kukkonen (jku)

documentation

README

Ambient credentials detection for CI systems

CI badge

ci-id provides easy access to ambient OIDC credentials in CI systems.

use ci_id::{detect_credentials, CIIDError};

fn main() -> Result<(), CIIDError>  {
    let token = detect_credentials(Some("myaudience"))?;
    print!("Ambient OIDC token detected: {}", token);
    Ok(())
}

See ci-id-bin crate for a simple CLI wrapper.

ci-id is based on id, a similar Python project.

Supported environments

Currently supported environments are:

  • GitHub Actions
  • GitLab CI/CD
  • CircleCI
  • Buildkite

See documentation for details on what configuration each of these environments needs.

License

ci-id is licensed under the Apache 2.0 License.

Commit count: 58

cargo fmt