From dc11f4df549d10e10581d6416b064a79122c529a Mon Sep 17 00:00:00 2001 From: Corey Osman Date: Wed, 20 Apr 2022 15:59:40 -0700 Subject: [PATCH] Adds a puppetfile workflow that uses ra10ke --- .github/workflows/puppetfile.yml | 46 ++++++++++++++++++++++++++++++++ README.md | 23 ++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .github/workflows/puppetfile.yml diff --git a/.github/workflows/puppetfile.yml b/.github/workflows/puppetfile.yml new file mode 100644 index 0000000..204db84 --- /dev/null +++ b/.github/workflows/puppetfile.yml @@ -0,0 +1,46 @@ +name: Puppetfile checks + +on: + workflow_call: + inputs: + container_image: + description: Image to use when running tests + default: 'puppet/puppet-dev-tools:2022-04-21-e44b72b' + required: false + type: string +jobs: + r10k_validate: + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + steps: + - uses: actions/checkout@v2 + - name: validate Puppetfile + run: rake -f /Rakefile r10k:validate + r10k_check_dups: + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + steps: + - uses: actions/checkout@v2 + - name: Check for puppetfile duplicates + run: rake -f /Rakefile r10k:duplicates + r10k_syntax: + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + steps: + - uses: actions/checkout@v2 + - name: Check for puppetfile syntax correctness + run: rake -f /Rakefile r10k:syntax + r10k_deprecation: + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + steps: + - uses: actions/checkout@v2 + - name: Check for puppetfile module deprecations + run: rake -f /Rakefile r10k:deprecation + r10k_find_outdated: + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + steps: + - uses: actions/checkout@v2 + - name: Check for outdated modules + run: rake -f /Rakefile r10k:dependencies diff --git a/README.md b/README.md index 45cd798..f8e31c5 100644 --- a/README.md +++ b/README.md @@ -214,3 +214,26 @@ jobs: uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1 working-directory: ./site/profiles ``` + +## Puppetfile checks +You can use the puppetfile workflow to check various POI on your puppetfile. To use this workflow do the following + +```yaml +# This is a basic workflow to help you get started with Actions + +name: Puppetfile checks + +# Controls when the workflow will run +on: + push: + workflow_dispatch: + +concurrency: + group: ${{ github.ref_name }} + cancel-in-progress: true + +jobs: + puppetfile: + name: puppetfile + uses: voxpupuli/gha-puppet/.github/workflows//puppetfile.yml@master +```