{"id":20753937,"url":"https://github.com/robotsandpencils/1password-action","last_synced_at":"2025-08-22T03:32:27.140Z","repository":{"id":40558059,"uuid":"306165624","full_name":"RobotsAndPencils/1password-action","owner":"RobotsAndPencils","description":"Import logins, passwords and documents from your 1Password vaults to use in your GitHub Action workflows.","archived":false,"fork":false,"pushed_at":"2024-10-31T22:12:34.000Z","size":882,"stargazers_count":33,"open_issues_count":8,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-13T03:14:35.387Z","etag":null,"topics":["1password","1password-cli","github-actions","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobotsAndPencils.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-21T22:48:03.000Z","updated_at":"2024-10-17T00:21:57.000Z","dependencies_parsed_at":"2024-04-12T01:55:42.753Z","dependency_job_id":"4c2f91f1-30b8-4ba4-8dd7-799b5baf088c","html_url":"https://github.com/RobotsAndPencils/1password-action","commit_stats":{"total_commits":82,"total_committers":6,"mean_commits":"13.666666666666666","dds":0.7195121951219512,"last_synced_commit":"c37ea0f3f49cce1a075e0c611a29bf28073314e8"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotsAndPencils%2F1password-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotsAndPencils%2F1password-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotsAndPencils%2F1password-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotsAndPencils%2F1password-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobotsAndPencils","download_url":"https://codeload.github.com/RobotsAndPencils/1password-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230554330,"owners_count":18244234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["1password","1password-cli","github-actions","typescript"],"created_at":"2024-11-17T09:15:18.400Z","updated_at":"2024-12-20T08:09:04.313Z","avatar_url":"https://github.com/RobotsAndPencils.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build-test](https://github.com/RobotsAndPencils/1password-action/workflows/build-test/badge.svg)\n![OS Support: Ubuntu and macOS](https://img.shields.io/badge/OS-Ubuntu%20%7C%20macOS-lightgrey)\n\n# 1Password GitHub Action\n\nImport logins, passwords and documents from your 1Password vaults to use in your GitHub Action workflows.\n\n```yaml\n- name: Import Secrets\n  uses: RobotsAndPencils/1password-action@v1\n  id: secrets\n  with:\n    device-id: ${{ secrets.OP_DEVICE_ID }}\n    sign-in-address: ${{ secrets.OP_SIGN_IN_ADDRESS }}\n    email-address: ${{ secrets.OP_EMAIL_ADDRESS }}\n    secret-key: ${{ secrets.OP_SECRET_KEY }}\n    master-password: ${{ secrets.OP_MASTER_PASSWORD }}\n    items: |\n      Client A \u003e App Store Connect\n      Client A \u003e Certificate | p12\n      Client A \u003e Provisioning Profile\n```\n\nThe imported items can then be used elsewhere in your workflow.\n\n```yaml\n- name: Build\n  env:\n    FASTLANE_USER: ${{ steps.secrets.outputs.app_store_connect_username }}\n    FASTLANE_PASSWORD: ${{ steps.secrets.outputs.app_store_connect_password }}\n    CERT_FILENAME: ${{ steps.secrets.outputs.p12_filename }}\n    PROFILE_FILENAME: ${{ steps.secrets.outputs.provisioning_profile_filename }}\n  run: fastlane ios build\n```\n\n## Inputs\n\n**Device ID:** Generate a device ID with `head -c 16 /dev/urandom | base32 | tr -d = | tr '[:upper:]' '[:lower:]'`. This should be stable across multiple workflow runs. If you're using GitHub-hosted runners you can set this as a secret, and if you're using self-hosted runners you could set it as an `OP_DEVICE` environment variable in the runner's shell. In the latter case you'll need to add a step before this action that plucks out the device ID and sets it in the workflow's environment, like:\n\n```yaml\n- name: Get 1Password device ID from macOS runner shell\n  shell: /bin/bash -l {0}\n  run: |\n    echo \"OP_DEVICE=$OP_DEVICE\" \u003e\u003e $GITHUB_ENV\n    echo \"::add-mask::$OP_DEVICE\"\n```\n\nNote: If you receive the `command not found: base32` error, you'll have to install `brew install coreutils`\n\n**Sign-In Address:** The full URL, with subdomain, where you sign in to 1Password.\n\n**Email Address:** The email address of the user you'll sign in with.\n\n**Secret Key:** The secret key of the user you'll sign in with. Especially if you're using GitHub-hosted runners, this will be a \"fresh\" sign in, so the action needs your secret key.\n\n**Master Password:** The master password of the user you'll sign in with.\n\n**Items:** A string that describes the vault and item name to import, and an optional output name to rename it to. This must be written in the format `VAULT \u003e ITEM | OUTPUT_NAME`. If the vault or item names contain `\u003e` or `|` characters, you can surround the name in quotes, like `\"\u003c Vault A \u003e\" \u003e Neopets`.\n\n## Outputs\n\n`Login` items will output both the username and password fields.\n\n`Password` items will output the password field.\n\nThe output variable's name will be the item's name with spaces and `.` replaced with `_`, non-alphanumeric characters removed, and lowercased. For example, a `Password` item named `Google Firebase 2020` would be available as the `google_firebase_2020_password` output variable.\n\nAnother example, a `Login` item named `App Store Login`, would be available as the `app_store_login_username` and `app_store_login_password` output variables.\n\n`Document` items will be saved as files with the same filename as in 1Password. Their filename will be set as an output variable following the same rules as login and password items. For example, a document with the filename `Apple Distribution.p12` will be saved as a file with the same name, and the filename will be available as the output variable `apple_distribution_p12_filename`.\n\nIn all cases, you can provide your own output name which will be used in place of the item name from 1Password, and normalized.\n\nAll password outputs are marked as secrets so that they're masked in your workflow's logs.\n\n---\n\n## Development\n\nInstall the dependencies\n\n```bash\n$ npm install\n```\n1. Install the dependencies `npm install`\n2. Install Docker Desktop https://www.docker.com/products/docker-desktop\n3. Install ACT - https://github.com/nektos/act\n4. Copy .secrets-example to .secrets and replace `xxxx` with real values\n5. Run `npm run act`\n\nCouple of things:\n\n- need to use the `ubuntu-latest=nektos/act-environments-ubuntu:18.04` docker image which is 18 GB!\n- `test` - the name of your job from the `.github/workflows/test.yml` file\n- `--secret-file .secrets` is a list of secrets that the docker image uses in replacement of github secrets. Set these locally and do not check in\n- `--env-file .environment` this simply adds in a `ACT=true`. This can be removed once https://github.com/nektos/act/pull/417 is released. Act v \u003e 0.2.17\n\nBuild the typescript and package it for distribution\n\n```bash\n$ npm run build \u0026\u0026 npm run package\n```\n\nRun the tests :heavy_check_mark:\n\n```bash\n$ npm test\n\n PASS  ./index.test.js\n  ✓ throws invalid number (3ms)\n  ✓ wait 500 ms (504ms)\n  ✓ test runs (95ms)\n\n...\n```\n\n## Publish to a distribution branch\n\n```bash\n$ npm run package\n$ git add dist\n$ git commit -a -m \"Made some changes\"\n$ git push origin releases/v1\n```\n\nSee the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\n\n## Contact\n\n\u003ca href=\"http://www.robotsandpencils.com\"\u003e\u003cimg src=\"R\u0026PLogo.png\" width=\"153\" height=\"74\" /\u003e\u003c/a\u003e\n\nMade with ❤️ by [Robots \u0026 Pencils](http://www.robotsandpencils.com)\n\n[Twitter](https://twitter.com/robotsNpencils) | [GitHub](https://github.com/robotsandpencils)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotsandpencils%2F1password-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotsandpencils%2F1password-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotsandpencils%2F1password-action/lists"}