From e7275672b4bf84f5065f2bbd1c4eabb93f452bd3 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 | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 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..68283b2 --- /dev/null +++ b/.github/workflows/puppetfile.yml @@ -0,0 +1,72 @@ +# This is a basic workflow to help you get started with Actions + +name: Puppetfile checks + +# Controls when the workflow will run +on: + workflow_call: + inputs: + container_image: + description: Image to use when running tests + default: 'puppet/puppet-dev-tools:2022-03-28-92c7176' + required: false + type: string +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + r10k_validate: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 +# - name: github known host +# run: mkdir /~/.ssh/ && echo githubPubKey >> /~/.ssh/known_hosts + - name: validate Puppetfile + run: rake -f /Rakefile r10k:validate + r10k_check_dups: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Check for puppetfile duplicates + run: rake -f /Rakefile r10k:duplicates + r10k_syntax: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Check for puppetfile syntax correctness + run: rake -f /Rakefile r10k:syntax + r10k_deprecation: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Check for puppetfile module deprecations + run: rake -f /Rakefile r10k:deprecation + r10k_solve_dependencies: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: ${{ inputs.container_image }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - run: mkdir -p /github/home/.cache + - name: Solve dependency resolution for errors + run: rake -f /Rakefile r10k:solve_dependencies