File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 14
14
branches :
15
15
- ' main'
16
16
17
+ workflow_dispatch :
18
+
17
19
jobs :
18
20
verify-format :
19
21
runs-on : ubuntu-latest
20
22
steps :
23
+
21
24
- name : Checkout code
22
25
uses : actions/checkout@v4
23
26
with :
24
27
submodules : false
25
28
persist-credentials : false
29
+
30
+ - name : Get first commit SHA
31
+ id : first-commit
32
+ if : github.event_name == 'workflow_dispatch'
33
+ run : echo "sha=$(git rev-list --max-parents=0 HEAD)" >> $GITHUB_OUTPUT
34
+
26
35
- name : Get changed source files that need format check
27
36
id : changed-files
28
37
uses : tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
38
47
libraries/extras/**
39
48
libraries/ea_malloc/**
40
49
write_output_files : true
50
+ base_sha : ${{ steps.first-commit.outputs.sha if github.event_name == 'workflow_dispatch' else '' }}
51
+
41
52
- name : List changed files
42
53
if : steps.changed-files.outputs.any_changed == 'true'
43
54
run : cat .github/outputs/all_changed_files.txt
55
+
44
56
- name : Run clang-format check
45
57
if : steps.changed-files.outputs.any_changed == 'true'
46
58
uses : pillo79/clang-format-action@05f671e71f0758aba4d3c9dbb0ee81bc5f0137c6
You can’t perform that action at this time.
0 commit comments