Skip to content

A GitHub Action that simplifies using Bitwarden Vault secrets as build variables

Notifications You must be signed in to change notification settings

flagbit/bitwarden-github-action

Repository files navigation

Bitwarden GitHub Action

A GitHub Action that simplifies using Bitwarden Vault secrets as build variables.

Example Usage

Example Usage

jobs:
    build:
        # ...
        steps:
            # ...
            - name: Checkout bitwarden action
              uses: actions/checkout@v2
              with:
                repository: flagbit/bitwarden-github-action
                ref: v1.4.1
                token: ${{ secrets.GHCR_TOKEN }}
            - name: Import secrets
              uses: ./
              with:
                client_id: ${{ secrets.BW_CLIENTID }}
                client_secret: ${{ secrets.BW_CLIENTSECRET }}
                master_password: ${{ secrets.BW_MASTER_PASSWORD }}
                secrets: |
                  customer/wuerth_h | composer_json | notes | COMPOSER_AUTH
                  customer/wuerth_h | SSH_PRIVATE_KEY | notes | SSH_PRIVATE_KEY
                  customer/wuerth_h | staging_db | login.password | DATABASE_PASSWORD_STAGING
                  customer/wuerth_h | production_db | login.password | DATABASE_PASSWORD_PRODUCTION
            # ...

Debugging

If during secrets usage something is unexpected and want to inspect the secret values you can disable the hidden secret functionality by setting the input parameter show_secrets: true.


Supported with ❤️ by Flagbit GmbH & Co. KG

About

A GitHub Action that simplifies using Bitwarden Vault secrets as build variables

Resources

Stars

Watchers

Forks

Packages

No packages published