@@ -29,49 +29,38 @@ permissions:
2929 contents : read
3030
3131jobs :
32- prepare-configs :
32+ super-linter :
33+ name : " Lint Code Base"
3334 runs-on : ubuntu-latest
35+ permissions :
36+ contents : read
37+ packages : read
38+ statuses : write
3439 steps :
3540 - name : " Get the common linters configuration"
36- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
41+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 .0.1
3742 with :
3843 ref : main # fix/superlinter-config
3944 repository : netcracker/.github
4045 persist-credentials : false
46+ path : common-configs
4147 sparse-checkout : |
4248 config/linters
43- - name : " Upload the common linters configuration"
44- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45- with :
46- name : linter-config
47- path : " ${{ github.workspace }}/config"
48- include-hidden-files : true
49- run-lint :
50- needs : [prepare-configs]
51- runs-on : ubuntu-latest
52- permissions :
53- contents : read
54- packages : read
49+ - name : " Move configs"
50+ run : |
51+ cp --update=none -vRT ./common-configs/config/linters /tmp/linters
52+ rm -rf ./common-configs
5553 # To report GitHub Actions status checks
56- statuses : write
57- steps :
58- - name : Checkout code
59- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
54+ - name : " Checkout code"
55+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
6056 with :
6157 # Full git history is needed to get a proper list of changed files within `super-linter`
6258 fetch-depth : 0
6359 persist-credentials : false
64- - name : " Get the common linters configuration"
65- uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
66- id : download
67- with :
68- name : linter-config
69- path : /tmp/linter-config
7060 - name : " Apply the common linters configuration"
71- if : ${{ steps.download.outputs.download-path != '' }}
7261 run : |
7362 mkdir -p ./.github/linters
74- cp --update=none -vRT /tmp/linter-config/ linters ./.github/linters
63+ cp --update=none -vRT /tmp/linters ./.github/linters
7564
7665 - name : " Load super-linter environment file"
7766 shell : bash
@@ -81,18 +70,17 @@ jobs:
8170 echo "Applying local linter environment:"
8271 grep "\S" ${GITHUB_WORKSPACE}/.github/super-linter.env | grep -v "^#"
8372 grep "\S" ${GITHUB_WORKSPACE}/.github/super-linter.env | grep -v "^#" >> $GITHUB_ENV
84- elif [ -f "/tmp/linter-config/ linters/super-linter.env" ]; then
73+ elif [ -f "/tmp/linters/super-linter.env" ]; then
8574 echo "::warning:: Local linter environment file .github/super-linter.env is not found"
8675 echo "Applying common linter environment:"
87- grep "\S" /tmp/linter-config/ linters/super-linter.env | grep -v "^#"
88- grep "\S" /tmp/linter-config/ linters/super-linter.env | grep -v "^#" >> $GITHUB_ENV
76+ grep "\S" /tmp/linters/super-linter.env | grep -v "^#"
77+ grep "\S" /tmp/linters/super-linter.env | grep -v "^#" >> $GITHUB_ENV
8978 fi
9079
91- - name : Lint Code Base
92- uses : super-linter/super-linter/slim@ffde3b2b33b745cb612d787f669ef9442b1339a6 # v8.1 .0
80+ - name : " Lint Code Base"
81+ uses : super-linter/super-linter/slim@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5 .0
9382 env :
9483 VALIDATE_ALL_CODEBASE : ${{ inputs.full_scan || false }}
9584 # To report GitHub Actions status checks
9685 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9786 DEFAULT_BRANCH : ${{ github.event.pull_request.base.ref || github.event.push.ref }}
98-
0 commit comments