Skip to content

Add boxcutter_python cookbook #45

Add boxcutter_python cookbook

Add boxcutter_python cookbook #45

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [main]
pull_request:
jobs:
ruby:
strategy:
fail-fast: false
matrix:
ruby: [2.5, 2.6, 2.7, 3.0, 3.1]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
# - name: Run rspec
# run: ./scripts/run_chefspec
- name: Run rubocop
run: ./scripts/run_rubocop .rubocop.yml
- name: Run cookstyle
run: ./scripts/run_cookstyle
kitchen:
strategy:
fail-fast: false
matrix:
os:
- centos-stream-9
- ubuntu-2004
- ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: boxcutter-chef-cookbooks
- name: Checkout chef-cookbooks repository
uses: actions/checkout@v3
with:
repository: boxcutter/chef-cookbooks
path: chef-cookbooks
- name: Install Chef
uses: actionshub/chef-install@main
with:
omnitruckUrl: omnitruck.cinc.sh
project: cinc-workstation
version: 23.7.1042
- name: Run Kitchen
working-directory: boxcutter-chef-cookbooks
run: |
kitchen test ${{ matrix.os }}
env:
CHEF_LICENSE: accept-no-persist
CHEF_VERSION: 18.2.7
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Shellcheck
uses: ludeeus/action-shellcheck@2.0.0
changes:
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'cookbooks' output variable
cookbooks: ${{ steps.filter.outputs.changes }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: boxcutter-chef-cookbooks
- name: Checkout chef-cookbooks repository
uses: actions/checkout@v3
with:
repository: boxcutter/chef-cookbooks
path: chef-cookbooks
- uses: dorny/paths-filter@v2
id: filter
with:
# Use context to get the branch where commits were pushed.
# If there is only one long-lived branch (e.g. main),
# you can specify it directly.
# If its not configured, the repository default branch is used.
base: ${{ github.ref }}
filters: |
boxcutter-chef-cookbooks/cookbooks/boxcutter_python: 'boxcutter-chef-cookbooks/cookbooks/boxcutter_python/**'
kitchen:

Check failure on line 94 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Continuous Integration

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 94, Col: 5): Unexpected value 'kitchen' .github/workflows/ci.yml (Line: 101, Col: 7): Unexpected value 'if'
needs: changes
strategy:
matrix:
# Parse JSON array containing names of all filters matching any of changed files
# e.g. ['image1', 'image2'] if both image folders contains changes
cookbook: ${{ fromJSON(needs.changes.outputs.cookbooks) }}
if: ${{ needs.changes.outputs.cookbooks != '[]' && needs.changes.outputs.cookbooks != '' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.cookbook }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: boxcutter-chef-cookbooks
- name: Checkout chef-cookbooks repository
uses: actions/checkout@v3
with:
repository: boxcutter/chef-cookbooks
path: chef-cookbooks
- name: Install Chef
uses: actionshub/chef-install@main
with:
omnitruckUrl: omnitruck.cinc.sh
project: cinc-workstation
version: 23.7.1042
- name: Run Kitchen
working-directory: ${{ matrix.cookbook }}
run: |
kitchen test
env:
CHEF_LICENSE: accept-no-persist
CHEF_VERSION: 18.2.7