Skip to content

A slightly better version of 1Password's "Load secrets from 1Password" action

License

Notifications You must be signed in to change notification settings

KamaranL/1password-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

1Password Load Secrets Action

Loads secrets into your GitHub runner from 1Password

view on GitHub view on GitHub

A slightly better version of Load secrets from 1Password by 1Password

Refer to 1Password's developer documentation for more on how you can use this action.

Features

  • Persistent install of 1Password CLI throughout the entire job
  • Windows runner support
  • All the original features from Load secrets from 1 Password

Usage

on: workflow_dispatch
jobs:
  matrix_jobs:
    strategy:
      matrix:
        os: ['ubuntu', 'macos', 'windows']
    runs-on: ${{ matrix.os }}-latest
    continue-on-error: true
    env:
      OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_TOKEN }}
    steps:
      - uses: KamaranL/1password-load-secrets-action@v1
        env:
          GH_TOKEN: op://Integrations/GitHub.kamaranl.CICD/credential

      - run: |
          Write-Host "GH_TOKEN: $env:GH_TOKEN"
        shell: powershell
        if: matrix.os == 'windows'

      - run: |
          echo "GH_TOKEN: $GH_TOKEN"
        if: matrix.os != 'windows'

      - run: op whoami

Acknowledgements

  • Thanks to 1Password for developing such a great product