aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/style-checks.yml
blob: 2ae0b86f08daca8bdd1ae926939b5dea277daec4 (plain)
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
# Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License").  You may not use
# this file except in compliance with the License.  You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html

name: Coding style validation 

on:
  pull_request:
    paths-ignore:
      - 'doc/**'
      - '*.md'
      - '*.pod'
      - 'README*'
      - 'funding.json'
      - 'LICENSE.txt'
      - 'VERSION.dat'

jobs:
  check-style:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v7
      - name: "Get changed files"
        env:
          NUMBER: ${{ github.event.pull_request.number }}
          GH_TOKEN: ${{ github.token }}
        run: |
          {
            echo 'CHANGED_FILES<<EOF'
            gh pr view $NUMBER --json files --jq '.files.[].path'
            echo EOF
          } >> "$GITHUB_ENV"
      - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
        with:
          extra_args: "--files $CHANGED_FILES"