Skip to content

Commit

Permalink
feat: add Puppet Forge deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
coreone committed Nov 15, 2023
1 parent bbf6fcb commit cf3206f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/puppet-forge-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
'on':
workflow_call:
inputs:
jobs_run_on:
default: ubuntu-latest
description: The runner group on which jobs will run.
required: false
type: string
puppet_version:
default: '7'
description: The version of Puppet to use in PDK
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
secrets:
forge_token:
description: The Puppet Forge token to use to deploy.
required: true
jobs:
forge-deploy:
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'
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: '3.2'
rubygems: 'latest'
- name: 'Module build'
run: 'bundle exec pdk build --force'
- name: 'Publish package to Puppet Forge'
env:
PDK_FORGE_TOKEN: ${{ secrets.forge_token }}
run: 'bundle exec pdk release publish'
timeout-minutes: ${{ inputs.timeout_minutes }}

0 comments on commit cf3206f

Please sign in to comment.