update: show github content #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: debianCheck | |
on: pull_request | |
# pull_request: | |
# paths-ignore: | |
# - ".github/workflows/**" | |
permissions: | |
pull-requests: write | |
contents: 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() | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: comment.txt |