Skip to content

Commit acf9cbf

Browse files
committed
Add SSH agents
1 parent dea496c commit acf9cbf

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/operations.site.deploy.ddev.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ on:
9595
description: |
9696
A private key with access to your git repository or other servers.
9797
This will be installed with the webfactory/ssh-agent so the key will only be available inside the job.
98+
9899
env:
99100
# Tell ddev to not set /etc/hosts file.
100101
DDEV_NONINTERACTIVE: true
@@ -117,8 +118,9 @@ jobs:
117118

118119
# Enable SSH agent to allow preview sites to clone.
119120
- uses: webfactory/ssh-agent@v0.9.1
121+
if: ${{ inputs.SSH_PRIVATE_KEY }}
120122
with:
121-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
123+
ssh-private-key: ${{ inputs.SSH_PRIVATE_KEY }}
122124

123125
- name: Clone code
124126
env:
@@ -237,6 +239,12 @@ jobs:
237239
- name: Install scripts
238240
uses: jonpugh/goatscripts@main
239241

242+
# Enable SSH agent.
243+
- uses: webfactory/ssh-agent@v0.9.1
244+
if: ${{ inputs.SSH_PRIVATE_KEY }}
245+
with:
246+
ssh-private-key: ${{ inputs.SSH_PRIVATE_KEY }}
247+
240248
- name: Prepare data
241249
working-directory: ${{ inputs.git_root }}
242250
env:

0 commit comments

Comments
 (0)