Skip to content

Commit

Permalink
Add CI with chart matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh committed Aug 2, 2024
1 parent d4d4a87 commit c1220c4
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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 == 'true' }} }
]
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) }}

steps:
-
name: Lint ${{ matrix.chart.name }}
run: |
echo "Linting ${{ matrix.chart.name }}. Modified: ${{ matrix.chart.modified }}"

0 comments on commit c1220c4

Please sign in to comment.