Skip to content
lock

GitHub Action

Inject secrets from 1Password

v0.2.0 Latest version

Inject secrets from 1Password

lock

Inject secrets from 1Password

Make secrets from 1Password Connect available as environment variables in the next steps

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Inject secrets from 1Password

uses: bxb100/load-secrets-action@v0.2.0

Learn more about this action in bxb100/load-secrets-action

Choose a version

Load Secrets from 1Password - GitHub Action

Provide the secrets your GitHub runner needs from 1Password.

Check Transpiled JavaScript CodeQL Continuous Integration Lint Codebase Coverage


This Action is same as official load-secrets-action, but using 1Password JavaScript SDK and connect API

This project support 1Password Service Account and 1Password Connect.

Usage

on: push
jobs:
  hello-world:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Load secret
        uses: bxb100/load-secrets-action@v0
        with:
          # Export loaded secrets as environment variables
          export-env: true
        env:
          OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
          SECRET: op://app-cicd/hello-world/secret

      - name: Print masked secret
        run: 'echo "Secret: $SECRET"'
        # Prints: Secret: ***