Skip to content

bxb100/load-secrets-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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: ***