Skip to content
lock

GitHub Action

1Password Load Secrets Action

v1 Latest version

1Password Load Secrets Action

lock

1Password Load Secrets Action

Loads secrets into your GitHub runner from 1Password

Installation

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

              

- name: 1Password Load Secrets Action

uses: KamaranL/1password-load-secrets-action@v1

Learn more about this action in KamaranL/1password-load-secrets-action

Choose a version

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