generated from sdavids/sdavids-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.22 KB
/
ci.yaml
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
---
# SPDX-FileCopyrightText: © 2024 Sebastian Davids <[email protected]>
# SPDX-License-Identifier: Apache-2.0
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: ci
on: # yamllint disable-line rule:truthy
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
lint:
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
uses: actions/[email protected]
- name: Classify changes
# https://github.com/dorny/paths-filter/releases
uses: dorny/[email protected]
id: changes
with:
filters: |
sh:
- '**.sh'
- 'zfunc/**'
yaml:
- '**.yaml'
- if: steps.changes.outputs.sh == 'true'
name: Lint shell scripts
run: |
find . -type f -name '*.sh' -print0 | xargs -0L1 shellcheck
find zfunc -type f -print0 | xargs -0L1 shellcheck
- if: steps.changes.outputs.yaml == 'true'
name: Lint YAML files
run: yamllint --strict .