mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 22:05:51 +08:00
Use common linter workflow
This commit is contained in:
parent
e11d0db61a
commit
f95d073b1b
23
.github/workflows/printer-linter-format.yml
vendored
23
.github/workflows/printer-linter-format.yml
vendored
@ -12,23 +12,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
printer-linter-format:
|
printer-linter-format:
|
||||||
name: Printer linter auto format
|
name: Printer linter auto format
|
||||||
|
uses: ultimaker/cura-workflows/.github/workflows/lint-formatter.yml@main
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Setup the build environment
|
|
||||||
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@main
|
|
||||||
|
|
||||||
- uses: greguintow/get-diff-action@v7
|
|
||||||
with:
|
with:
|
||||||
PATTERNS: |
|
file_patterns: resources/+(definitions|extruders)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg
|
||||||
resources/+(definitions|extruders)/*.def.json
|
command: python printer-linter/src/terminal.py --format
|
||||||
resources/+(intent|quality|variants)/**/*.inst.cfg
|
commit_message: "Apply printer-linter format"
|
||||||
|
|
||||||
- name: Format file
|
|
||||||
if: env.GIT_DIFF && !env.MATCHED_FILES
|
|
||||||
run: python printer-linter/src/terminal.py --format ${{ env.GIT_DIFF_FILTERED }}
|
|
||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
if: env.GIT_DIFF && !env.MATCHED_FILES
|
|
||||||
with:
|
|
||||||
commit_message: "Applied printer-linter format"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user