name: Pylint on: pull_request: types: [opened, synchronize, reopened] jobs: build: runs-on: [ self-hosted ] strategy: matrix: python-version: ["3.9"] steps: - uses: actions/checkout@v3 - name: Install dependencies run: | python3 -m pip install --upgrade pip pip3 install pylint - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') > pylint-report.txt continue-on-error: true - name: Create PR comment for pylint uses: actions/github-script@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); const output = fs.readFileSync('pylint-report.txt', 'utf8'); github.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: output });