Skip to content

Commit 8e74848

Browse files
committed
ssh_private_key pass as arg
1 parent fa8a18d commit 8e74848

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/extra_soundness.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ on:
1515
type: string
1616
description: "List of Swift versions to test with."
1717
default: '["6.0", "6.1"]'
18-
use_ssh_for_private_deps:
19-
type: boolean
20-
description: "Set up ssh-agent with SSH_PRIVATE_KEY to fetch private SwiftPM deps over SSH."
21-
default: false
18+
ssh_private_key:
19+
type: string
20+
description: "Private SSH key to use for private SwiftPM dependencies"
21+
default: ""
2222

2323
concurrency:
2424
group: ${{ github.workflow }}-${{ github.ref }}-extra-soundness
@@ -50,15 +50,15 @@ jobs:
5050
steps:
5151
- name: Checkout
5252
uses: actions/checkout@v4
53-
54-
- name: Set up SSH for private SwiftPM deps
55-
if: ${{ inputs.use_ssh_for_private_deps }}
53+
54+
- name: Set up SSH if key provided
55+
if: ${{ inputs.ssh_private_key != '' }}
5656
uses: webfactory/ssh-agent@v0.9.0
5757
with:
58-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
58+
ssh-private-key: ${{ inputs.ssh_private_key }}
5959

60-
- name: Trust github.com host key
61-
if: ${{ inputs.use_ssh_for_private_deps }}
60+
- name: Trust github.com
61+
if: ${{ inputs.ssh_private_key != '' }}
6262
run: |
6363
mkdir -p ~/.ssh
6464
ssh-keyscan github.com >> ~/.ssh/known_hosts

0 commit comments

Comments
 (0)