aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/main.yaml
blob: 9193deb91551f133552f654d05c0aa862bf7f5a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: CI

on:
  push:
    branches:
      - main
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  changes:
    runs-on: ubuntu-latest
    outputs:
      ansible: ${{ steps.changes.outputs.ansible }}
      kubernetes: ${{ steps.changes.outputs.kubernetes }}
    steps:
    - uses: actions/checkout@v5

    - uses: dorny/paths-filter@v3
      id: changes
      with:
        filters: |
          ansible:
            - 'ansible/**'
            - 'uv.lock'
          kubernetes:
            - 'kubernetes/**'
            - 'uv.lock'

  lint:
    uses: ./.github/workflows/lint.yaml

  lint-ansible:
    needs: changes
    if: ${{ needs.changes.outputs.ansible == 'true' }}
    uses: ./.github/workflows/lint-ansible.yaml

  lint-kubernetes:
    needs: changes
    if: ${{ needs.changes.outputs.kubernetes == 'true' }}
    uses: ./.github/workflows/lint-kubernetes.yaml
    secrets:
      kube-config: ${{ secrets.KUBECONFIG }}