-
Notifications
You must be signed in to change notification settings - Fork 44
34 lines (30 loc) · 994 Bytes
/
pre-commit.yml
File metadata and controls
34 lines (30 loc) · 994 Bytes
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
# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors
# SPDX-FileContributor: Zheng Junjie <zhengjunjie@iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0
name: pre-commit
permissions:
contents: read
pull-requests: read
on:
pull_request:
branches: [main, ci-test]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- name: get changed files
id: changed-files
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
- uses: pre-commit/action@v3.0.1
if: steps.changed-files.outputs.any_changed == 'true'
with:
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}