Skip to content

Add CI

Add CI #9

Workflow file for this run

name: ci
on:
# Run on all PRs
pull_request:
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
charts: |
[
{"name": "aserto", "modified": ${{ steps.changes.outputs.aserto == 'true' }} },
{"name": "aserto-lib", "modified": ${{ steps.changes.outputs.aserto-lib == 'true' }} },
{"name": "authorizer", "modified": ${{ steps.changes.outputs.authorizer == 'true' }} },
{"name": "console", "modified": ${{ steps.changes.outputs.console == 'true' }} },
{"name": "directory", "modified": ${{ steps.changes.outputs.directory == 'true' }} },
{"name": "discovery", "modified": ${{ steps.changes.outputs.discovery == 'true' }} },
{"name": "scim", "modified": ${{ steps.changes.outputs.scim == 'false' }} }
]
steps:
-
name: Find changed charts
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
aserto:
- 'aserto/**'
aserto_lib:
- 'aserto-lib/**'
authorizer:
- 'authorizer/**'
console:
- 'console/**'
directory:
- 'directory/**'
discovery:
- 'discovery/**'
scim:
- 'scim/**'
test-changes:
runs-on: ubuntu-latest
needs: detect-changes
strategy:
matrix:
chart: ${{ fromJSON(needs.detect-changes.outputs.charts) }}
exclude:
- { modified: false }
steps:
-
name: Lint ${{ matrix.chart.name }}
run: |
echo "Linting ${{ matrix.chart.name }}. Modified: ${{ matrix.chart.modified }}"