-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (58 loc) · 1.79 KB
/
puppet-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
'on':
workflow_call:
inputs:
jobs_run_on:
default: ubuntu-latest
description: The runner group on which jobs will run.
required: false
type: string
puppet_package_name:
default: ''
description: The name of the PyPi package the repo will create.
required: false
type: string
puppet_version:
default: '7'
description: The version of Puppet to use in PDK
required: false
type: string
ruby_version:
description: The version of Ruby to use for the run.
default: '3.2'
required: false
type: string
timeout_minutes:
description: The maximum time (in minutes) for a job to run.
default: 5
required: false
type: number
working_directory:
description: The working directory where all jobs should be executed.
default: '.'
required: false
type: string
jobs:
test-build:
defaults:
run:
working-directory: ${{ inputs.working_directory }}
runs-on: ${{ inputs.jobs_run_on }}
steps:
- name: 'Checkout repo'
uses: 'actions/checkout@v4'
- name: "Set up Ruby ${{ inputs.ruby_version }}"
uses: 'ruby/[email protected]'
env:
BUNDLE_SILENCE_ROOT_WARNING: '1'
BUNDLE_WITH: 'development'
PUPPET_GEM_VERSION: "~> ${{ inputs.puppet_version }}"
with:
bundler-cache: true
ruby-version: "${{ inputs.ruby_version }}"
rubygems: 'latest'
- name: 'Module build'
run: 'bundle exec pdk build --force'
- name: 'Test module install'
run: "bundle exec puppet module install pkg/${{ inputs.puppet_package_name }}-*.tar.gz"
timeout-minutes: ${{ inputs.timeout_minutes }}