aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/check-profiles.yml
blob: 0185376a49d238589b18a8a0a0fa27ff1c568f4f (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Lints and checks for potential issues in the profiles.

name: Check-Profiles

on:
  workflow_dispatch:
  push:
    branches-ignore:
      - 'dependabot/**'
    paths:
      - 'ci/check/profiles/**'
      - 'etc/**'
      - .github/workflows/check-profiles.yml
      - ci/printenv.sh
      - contrib/sort.py
      - src/firecfg/firecfg.config
  pull_request:
    paths:
      - 'ci/check/profiles/**'
      - 'etc/**'
      - .github/workflows/check-profiles.yml
      - ci/printenv.sh
      - contrib/sort.py
      - src/firecfg/firecfg.config

permissions:  # added using https://github.com/step-security/secure-workflows
  contents: read

jobs:
  profile-checks:
    runs-on: ubuntu-latest
    steps:
    - name: Harden Runner
      uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895
      with:
        disable-sudo: true
        egress-policy: block
        allowed-endpoints: >
          github.com:443

    - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
    - name: print env
      run: ./ci/printenv.sh
    - run: python3 --version

    - name: sort.py
      run: >
        ./ci/check/profiles/sort.py
        etc/inc/*.inc etc/{profile-a-l,profile-m-z}/*.profile
# Currently broken (see #5610)
#   - name: private-etc-always-required.sh
#     run: >
#       ./ci/check/profiles/private-etc-always-required.sh
#       etc/inc/*.inc etc/{profile-a-l,profile-m-z}/*.profile
    - name: sort-disable-programs.sh
      run: >
        ./ci/check/profiles/sort-disable-programs.sh
        etc/inc/disable-programs.inc
    - name: sort-firecfg.config.sh
      run: >
        ./ci/check/profiles/sort-firecfg.config.sh
        src/firecfg/firecfg.config