mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Use common linter workflow
This commit is contained in:
parent
e11d0db61a
commit
f95d073b1b
1 changed files with 14 additions and 29 deletions
43
.github/workflows/printer-linter-format.yml
vendored
43
.github/workflows/printer-linter-format.yml
vendored
|
@ -1,34 +1,19 @@
|
|||
name: printer-linter-format
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'resources/definitions/**'
|
||||
- 'resources/extruders/**'
|
||||
- 'resources/intent/**'
|
||||
- 'resources/quality/**'
|
||||
- 'resources/variants/**'
|
||||
push:
|
||||
paths:
|
||||
- 'resources/definitions/**'
|
||||
- 'resources/extruders/**'
|
||||
- 'resources/intent/**'
|
||||
- 'resources/quality/**'
|
||||
- 'resources/variants/**'
|
||||
|
||||
jobs:
|
||||
printer-linter-format:
|
||||
name: Printer linter auto format
|
||||
|
||||
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:
|
||||
PATTERNS: |
|
||||
resources/+(definitions|extruders)/*.def.json
|
||||
resources/+(intent|quality|variants)/**/*.inst.cfg
|
||||
|
||||
- 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"
|
||||
printer-linter-format:
|
||||
name: Printer linter auto format
|
||||
uses: ultimaker/cura-workflows/.github/workflows/lint-formatter.yml@main
|
||||
with:
|
||||
file_patterns: resources/+(definitions|extruders)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg
|
||||
command: python printer-linter/src/terminal.py --format
|
||||
commit_message: "Apply printer-linter format"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue