File tree Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : PDK basic
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ container_image :
7+ description : Image to use when running tests
8+ default : ' puppet/puppet-dev-tools:2022-04-21-e44b72b'
9+ required : false
10+ type : string
11+
12+ jobs :
13+ validate :
14+ runs-on : ubuntu-latest
15+ strategy :
16+ matrix :
17+ puppet-version : [7]
18+ container : ${{ inputs.container_image }}
19+
20+ steps :
21+ - uses : actions/checkout@v2
22+ - name : action-pdk-validate-puppet-${{ matrix.puppet-version }}
23+ run : pdk validate --puppet-version=${{ matrix.puppet-version }}
24+
25+ unit-puppet :
26+ runs-on : ubuntu-latest
27+ strategy :
28+ matrix :
29+ puppet-version : [5, 6, 7]
30+ container : ${{ inputs.container_image }}
31+ needs : validate
32+ steps :
33+ - uses : actions/checkout@v2
34+
35+ - name : action-pdk-test-unit-puppet-${{ matrix.puppet-version }}
36+ run : pdk test unit --puppet-version=${{ matrix.puppet-version }}
Original file line number Diff line number Diff line change @@ -214,3 +214,31 @@ jobs:
214214 uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
215215 working-directory: ./site/profiles
216216` ` `
217+
218+ # # Cloning private repos
219+ If your CI pipline will clone private repos via the .fixtures.yml or Puppetfile
220+ you will need to supply a ssh private key for the runner to use during the job.
221+
222+ That ssh private key can be a machine user's ssh key, or github deploy key. As long
223+ as the key has access to the repos it will need to clone.
224+
225+ You will need to create a github secret for the private key named `PRIVATE_SSH_KEY`
226+
227+ An example CI workflow is below for this kind of setup.
228+
229+ For reference : https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions
230+
231+
232+ ` ` ` yaml
233+ name: CI
234+
235+ on: pull_request
236+
237+ jobs:
238+ puppet:
239+ name: Setup deploy key
240+ run: eval ` ssh-agent -s` && ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}'
241+ name : Puppet
242+ uses : voxpupuli/gha-puppet/.github/workflows/pdk-basic.yml@master
243+
244+ ```
You can’t perform that action at this time.
0 commit comments