Skip to content

Conversation

@volodymyrZotov
Copy link
Contributor

@volodymyrZotov volodymyrZotov commented Jul 24, 2025

This PR brings Windows runners support.

(!!!Currently pipeline fails as Service Account reaches the rate limit as of extensive testing of the updated pipeline)

Closes: TODO

Thoughts process


Changes to use "@1password/install-cli-action"

Currently this action is uses bash script to install 1Password CLI. It works on Lunix and MacOS runners, but to support Windows, we need to write separate script for Windows.

As this is brings additional complexity, decided to use latest 1Password's install-cli-action which already supports Windows runners and is written in Typescript. With that, "@1password/install-cli-action" is added as dependency in package.json.

To avoid the need to publish and maintain another NPM package for 1Password team, "@1password/install-cli-action" is installed directly from github repo and not from NPM. (Currently it points to a feature branch, but will point to the specific version v2.0.1 as soon as it's merged and published)

To be able successfully import "@1password/install-cli-action" and use in the core, the type of the package is changed from module to commonjs in package.json. This is required in order to make a bundle (npm run build) that works on runners.

Also, you can find that config/jest.config.js export was changed to module.exports, this is because now the package type is commonjs.


Possibility to provide cli version via version input param

As a benefit of using "@1password/install-cli-action" package, now users will be able to pass version input param to install specific 1Password CLI version. It defaults to latest stable if not provided.


Make testing pipeline work on Windows runners

To make testing pipeline work on Windows runners the configure action was re-written in JS instead of bash. And therefore you can find additional npm run build:configure command in package.json, which makes bundle for configure action.


Update test pipelines to test on different CLI versions

Test pipeline were updated to be able to test on different CLI versions.

Also additional step was added to make sure that configure action properly sets env vars (OP_HOST/TOKEN and OP_SERVICE_ACCOUNT_TOKEN).

And another one step, to verify that installed CLI version matches the one provided as input param.

@volodymyrZotov volodymyrZotov force-pushed the vzt/windows-support2 branch 3 times, most recently from 38c0664 to 8172824 Compare July 30, 2025 15:48
As ncc uses commonjs bundle type and we import `install-cli-action` which is also commonjs, we should not set `type: module` in the package.json so it doesn't break the load-secrets-action bundle. Therefore, we can safely remove it at all.

Revert package.json
@volodymyrZotov volodymyrZotov force-pushed the vzt/windows-support2 branch 3 times, most recently from 76c4552 to b47da94 Compare July 30, 2025 17:40
@volodymyrZotov volodymyrZotov force-pushed the vzt/windows-support2 branch 4 times, most recently from b156b4f to 552bcb3 Compare July 30, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants