File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,33 @@ permissions:
21
21
contents : read
22
22
23
23
jobs :
24
+ checks :
25
+ name : Checks and variables
26
+ runs-on : ubuntu-22.04
27
+ outputs :
28
+ docs_only : ${{ steps.docs.outputs.docs_only == 'true' }}
29
+ steps :
30
+ - name : Checkout Repository
31
+ uses : actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
32
+ with :
33
+ fetch-depth : 0
34
+
35
+ - name : Filter only docs changes
36
+ id : docs
37
+ run : |
38
+ files=$(git diff --name-only HEAD^ | egrep -v "^docs/")
39
+ if [ -z "$files" ]; then
40
+ echo "docs_only=true" >> $GITHUB_OUTPUT
41
+ else
42
+ echo "docs_only=false" >> $GITHUB_OUTPUT
43
+ fi
44
+ echo $files
45
+ cat $GITHUB_OUTPUT
46
+ shell : bash --noprofile --norc -o pipefail {0}
47
+
24
48
analyze :
49
+ if : ${{ needs.checks.outputs.docs_only != 'true' }}
50
+ needs : [checks]
25
51
permissions :
26
52
actions : read # for github/codeql-action/init to get workflow details
27
53
contents : read # for actions/checkout to fetch code
You can’t perform that action at this time.
0 commit comments