Coder Social home page Coder Social logo

1password / install-cli-action Goto Github PK

View Code? Open in Web Editor NEW
31.0 10.0 12.0 8 KB

Install 1Password CLI into your GitHub Actions jobs.

Home Page: https://developer.1password.com

License: MIT License

Shell 100.00%
1password 1password-cli 1password-connect github-actions secrets-management service-accounts

install-cli-action's Introduction

1Password CLI - GitHub Action

Install the 1Password CLI to access and manage your 1Password items in your GitHub Action runner.

Get started

✨ Quickstart

To install the latest version of the 1Password CLI:
(Note: latest version is installed by default, so you don't need to specify a version.)

- name: Install 1Password CLI
  uses: 1password/install-cli-action@v1

To install the latest beta version (i.e. latest-beta) of the 1Password CLI:

- name: Install 1Password CLI
  uses: 1password/install-cli-action@v1
  with:
    version: latest-beta

To install a specific version of the 1Password CLI:

- name: Install 1Password CLI
  uses: 1password/install-cli-action@v1
  with:
    version: 2.18.0

⚙️ Supported Runners

You can perform the action on Linux and macOS runners. Windows is not currently supported.

💙 Community & Support

🔐 Security

1Password requests you practice responsible disclosure if you discover a vulnerability.

Please file requests via BugCrowd.

For information about security practices, please visit our Security homepage.

install-cli-action's People

Contributors

edif2008 avatar ingridcrant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

install-cli-action's Issues

Github Action Error: invalid JSON provided

Hi.

I 'm trying to edit an item using this github action but it's failing with Error: 2024/08/09 19:06:52 invalid JSON provided

2024-08-09T19:06:51.0562468Z --- START
2024-08-09T19:06:51.5807310Z 7:06PM | DEBUG | InitDefaultCache: successfully initialized cache
2024-08-09T19:06:51.5828654Z 7:06PM | DEBUG | EncryptedKeysets: Cache miss on keyset
2024-08-09T19:06:51.6463028Z 7:06PM | DEBUG | SetEncryptedKeysets: Successfully cached keyset
2024-08-09T19:06:51.6464435Z 7:06PM | DEBUG | Vault: cache miss on vault ***
2024-08-09T19:06:51.7261988Z 7:06PM | DEBUG | SetVault: successfully cached vault ***
2024-08-09T19:06:51.7939655Z 7:06PM | DEBUG | VaultItems: cache miss on vault items of vault ***
2024-08-09T19:06:51.8613037Z 7:06PM | DEBUG | SetVaultItems: successfully cached vault items of vault ***
2024-08-09T19:06:51.8614163Z ID                            TITLE                                             VAULT                             EDITED
2024-08-09T19:06:51.8616188Z [REDACTED]    Service Account Auth Token: github-actions        Operations - Customers            1 hour ago
2024-08-09T19:06:51.8618739Z ***    Customer Keys                                     Operations - Customers            2 minutes ago
2024-08-09T19:06:51.8627866Z --- MID
2024-08-09T19:06:51.8697896Z 7:06PM | DEBUG | Skipped loading desktop app settings file. The desktop app might not be installed: read file: lstat /home/runner/.config/1Password/settings/settings.json: no such file or directory
2024-08-09T19:06:52.1080185Z 7:06PM | DEBUG | InitDefaultCache: successfully initialized cache
2024-08-09T19:06:52.1081314Z 7:06PM | DEBUG | EncryptedKeysets: Cache hit on keyset
2024-08-09T19:06:52.1082233Z [ERROR] 2024/08/09 19:06:52 invalid JSON provided
2024-08-09T19:06:52.1092324Z --- END
2024-08-09T19:06:52.1101095Z ##[debug]Finishing: Update 1Password```

I 'm using a RW Service Account token from exported to repos secret OP_SERVICE_ACCOUNT_TOKEN.

Both item list and item edit works from my desktop. I've no OP desktop app installed, only the chrome extension.
Only item list works from githuc action.

This is the snippet of my workflow. All variables are properly populated

    - name: Install 1Password CLI
      uses: 1password/install-cli-action@v1

    - name: Update 1Password
      run: |
        echo --- START
        op --debug item list --vault $OP_VAULT_ID || true
        echo --- MID
        op --debug item edit $OP_ITEM_ID --vault $OP_VAULT_ID keys=teste || true
        echo --- END

Failed to get version of op CLI: failed to execute command: exec: "op": executable file not found in $PATH

Hello,

We are trying to use "install-cli-action" to install the 1Password cli in GitHub actions. We are using the 1Password Terraform provider to try and load secrets, but it appears that this install is not available to the Terraform provider..

│ Error: failed to get version of op CLI: failed to execute command: exec: "op": executable file not found in $PATH

│ with data.onepassword_item.op_item,
│ on main.tf line 6, in data "onepassword_item" "op_item":
│ 6: data "onepassword_item" "op_item" {

Just wondering if there is anything we need to do to make this install available to Terraform? We are not setting any paths on the Terraform provider, so not sure why it can't find the cli. We did notice the the install script unpacks to a tmp folder and then sets the GITHUB_PATH, but that does not appear to allow the Terraform provider to find the "op" command.

We are probably just missing something simple, but before we try and script the install ourselves, I figured I would ask here for some guidance.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.