diff --git a/.github/workflows/printer-linter-format.yml b/.github/workflows/printer-linter-format.yml index e5e1b5b1d6..8e65a481c4 100644 --- a/.github/workflows/printer-linter-format.yml +++ b/.github/workflows/printer-linter-format.yml @@ -18,19 +18,20 @@ jobs: - 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: Setup Python and pip + if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes. + uses: actions/setup-python@v4 + with: + python-version: 3.11.x + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-printer-linter.txt + - name: Install Python requirements for runner if: env.GIT_DIFF && !env.MATCHED_FILES run: pip install -r .github/workflows/requirements-printer-linter.txt diff --git a/.github/workflows/printer-linter-pr-diagnose.yml b/.github/workflows/printer-linter-pr-diagnose.yml index 0dac8ba7e7..57c3732d81 100644 --- a/.github/workflows/printer-linter-pr-diagnose.yml +++ b/.github/workflows/printer-linter-pr-diagnose.yml @@ -16,19 +16,20 @@ jobs: with: fetch-depth: 2 - - 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/+(extruders|definitions)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg + - name: Setup Python and pip + if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes. + uses: actions/setup-python@v4 + with: + python-version: 3.11.x + cache: "pip" + cache-dependency-path: .github/workflows/requirements-printer-linter.txt + - name: Install Python requirements for runner if: env.GIT_DIFF && !env.MATCHED_FILES run: pip install -r .github/workflows/requirements-printer-linter.txt