File tree Expand file tree Collapse file tree 3 files changed +42
-3
lines changed
Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,30 @@ jobs:
5656 run : |
5757 echo "$OP_CONNECT_CREDENTIALS" > 1password-credentials.json
5858 docker compose -f tests/fixtures/docker-compose.yml up -d && sleep 10
59- - name : Configure Service account
59+ - name : Configure Service account for Linux or MacOS runner
6060 if : ${{ matrix.auth == 'service-account' }}
6161 uses : ./configure
6262 with :
6363 service-account-token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
64- - name : Configure 1Password Connect
64+ - name : Configure 1Password Connect for Linux or MacOS runner
6565 if : ${{ matrix.auth == 'connect' }}
6666 uses : ./configure # 1password/load-secrets-action/configure@<version>
6767 with :
6868 connect-host : http://localhost:8080
6969 connect-token : ${{ secrets.OP_CONNECT_TOKEN }}
70+ - name : Configure Service account for Windows runner
71+ if : ${{ matrix.auth == 'service-account' }}
72+ uses : ./configure
73+ with :
74+ runner : ' windows'
75+ service-account-token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
76+ - name : Configure 1Password Connect for Windows runner
77+ if : ${{ matrix.auth == 'connect' }}
78+ uses : ./configure # 1password/load-secrets-action/configure@<version>
79+ with :
80+ runner : ' windows'
81+ connect-host : http://localhost:8080
82+ connect-token : ${{ secrets.OP_CONNECT_TOKEN }}
7083 - name : Load secrets
7184 id : load_secrets
7285 uses : ./ # 1password/load-secrets-action@<version>
Original file line number Diff line number Diff line change 88 description : Token to authenticate to your 1Password Connect instance
99 service-account-token :
1010 description : Your 1Password service account token
11+ runner :
12+ description : The runner to use for this action. Valid values are `ubuntu`, `windows`, and `macos`.
13+ default : ubuntu
14+ required : false
15+ type : string
1116runs :
1217 using : composite
1318 steps :
1722 INPUT_CONNECT_TOKEN : ${{ inputs.connect-token }}
1823 INPUT_SERVICE_ACCOUNT_TOKEN : ${{ inputs.service-account-token }}
1924 run : |
20- ${{ github.action_path }}/entrypoint.sh
25+ if [ "${{ inputs.runner }}" = "windows" ]; then
26+ pwsh ${{ github.action_path }}/entrypoint.ps1
27+ else
28+ bash ${{ github.action_path }}/entrypoint.sh
29+ fi
Original file line number Diff line number Diff line change 1+ if ($env: INPUT_CONNECT_HOST ) {
2+ Add-Content - Path $env: GITHUB_ENV - Value " OP_CONNECT_HOST=$ ( $env: INPUT_CONNECT_HOST ) " - Encoding utf8
3+ } elseif ($env: OP_CONNECT_HOST ) {
4+ Add-Content - Path $env: GITHUB_ENV - Value " OP_CONNECT_HOST=$ ( $env: OP_CONNECT_HOST ) " - Encoding utf8
5+ }
6+
7+ if ($env: INPUT_CONNECT_TOKEN ) {
8+ Add-Content - Path $env: GITHUB_ENV - Value " OP_CONNECT_TOKEN=$ ( $env: INPUT_CONNECT_TOKEN ) " - Encoding utf8
9+ } elseif ($env: OP_CONNECT_TOKEN ) {
10+ Add-Content - Path $env: GITHUB_ENV - Value " OP_CONNECT_TOKEN=$ ( $env: OP_CONNECT_TOKEN ) " - Encoding utf8
11+ }
12+
13+ if ($env: INPUT_SERVICE_ACCOUNT_TOKEN ) {
14+ Add-Content - Path $env: GITHUB_ENV - Value " OP_SERVICE_ACCOUNT_TOKEN=$ ( $env: INPUT_SERVICE_ACCOUNT_TOKEN ) " - Encoding utf8
15+ } elseif ($env: OP_SERVICE_ACCOUNT_TOKEN ) {
16+ Add-Content - Path $env: GITHUB_ENV - Value " OP_SERVICE_ACCOUNT_TOKEN=$ ( $env: OP_SERVICE_ACCOUNT_TOKEN ) " - Encoding utf8
17+ }
You can’t perform that action at this time.
0 commit comments