From 4759ffc994f15ca7bd9da362dd7adc4a7c120bb2 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Thu, 20 Jul 2023 23:18:13 +0200 Subject: [PATCH] Merge changed steps using `files_yaml` (#5923) --- .github/workflows/ci.yaml | 40 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f8c5ff248c..1d49332d04 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,35 +23,33 @@ jobs: name: "Determine changes" runs-on: ubuntu-latest outputs: - linter: ${{ steps.linter.outputs.any_changed }} - formatter: ${{ steps.formatter.outputs.any_changed }} + linter: ${{ steps.changed.outputs.linter_any_changed }} + formatter: ${{ steps.changed.outputs.formatter_any_changed }} steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: tj-actions/changed-files@v37 - id: linter + id: changed with: - files: | - Cargo.toml - Cargo.lock - crates/** - !crates/ruff_python_formatter/** - !crates/ruff_formatter/** - !crates/ruff_dev/** - !crates/ruff_shrinking/** + files_yaml: | + linter: + - Cargo.toml + - Cargo.lock + - crates/** + - "!crates/ruff_python_formatter/**" + - "!crates/ruff_formatter/**" + - "!crates/ruff_dev/**" + - "!crates/ruff_shrinking/**" - - uses: tj-actions/changed-files@v37 - id: formatter - with: - files: | - Cargo.toml - Cargo.lock - crates/ruff_python_formatter/** - crates/ruff_formatter/** - crates/ruff_python_trivia/** - crates/ruff_python_ast/** + formatter: + - Cargo.toml + - Cargo.lock + - crates/ruff_python_formatter/** + - crates/ruff_formatter/** + - crates/ruff_python_trivia/** + - crates/ruff_python_ast/** cargo-fmt: