Skip to content

golangci-lint check test #44

golangci-lint check test

golangci-lint check test #44

Workflow file for this run

name: debianCheck
on: pull_request
# pull_request:
# paths-ignore:
# - ".github/workflows/**"
permissions:
pull-requests: write
contents: read
checks: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_JOB: ${{ github.job }}
GITHUB_WORKFLOW_SHA: ${{ github.workflow_sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_REF_TYPE: ${{ github.ref_type }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
EXCLUDE_FILES: "js,vue,ts,less,html,go,css,json,txt,doc,jpg,png,svg,py,yml,md"
jobs:
debian-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: '2'
- name: Check Debian Prefix
id: check-debian-prefix
if: steps.checkout.outcome == 'success'
run: |
python3 $GITHUB_WORKSPACE/.github/script/debian-check.py --type pre-check
- name: Check Specical Words
id: check-specical-words
if: steps.checkout.outcome == 'success' && always()
env:
FILTER_KEYS: "getcap,setcap,lshw,dmidecode"
run: |
python3 $GITHUB_WORKSPACE/.github/script/debian-check.py --type keys-check --keys $FILTER_KEYS --log keys.json
- name: Check Env Set Words
id: check-env-set-words
if: steps.checkout.outcome == 'success' && always()
env:
FILTER_KEYS: "export,unset"
run: |
python3 $GITHUB_WORKSPACE/.github/script/debian-check.py --type keys-check --keys $FILTER_KEYS --log env-keys.json
- name: Publish reports
if: always()
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: |
keys.json
env-keys.json
- name: Comment PR
if: always() && hashFiles('comment.txt')
uses: thollander/actions-comment-pull-request@v2
with:
filePath: comment.txt