mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-30 01:55:55 +08:00
Renamed the workflow for consistency
This commit is contained in:
parent
4d0d9ec2dd
commit
db7e89815e
45
.github/workflows/printer-linter-format.yml
vendored
Normal file
45
.github/workflows/printer-linter-format.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: printer-linter-format
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- '[1-9].[0-9]'
|
||||||
|
- '[1-9].[0-9][0-9]'
|
||||||
|
path:
|
||||||
|
- 'resources/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
printer-linter-format:
|
||||||
|
name: Printer linter auto format
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Python and pip
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.11.x
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: .github/workflows/requirements-printer-linter.txt
|
||||||
|
|
||||||
|
- uses: technote-space/get-diff-action@v6
|
||||||
|
with:
|
||||||
|
PATTERNS: |
|
||||||
|
resources/+(definitions|extruders)/*.def.json
|
||||||
|
resources/+(intent|quality|variants)/**/*.inst.cfg
|
||||||
|
|
||||||
|
- name: Install Python requirements for runner
|
||||||
|
if: env.GIT_DIFF && !env.MATCHED_FILES
|
||||||
|
run: pip install -r .github/workflows/requirements-printer-linter.txt
|
||||||
|
|
||||||
|
- 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