From 77c7115b48d6691e8efb5d91328924905cbd4167 Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Thu, 18 Jul 2024 20:02:07 +0200 Subject: [PATCH] Separate lint and format into to steps --- .github/workflows/pull_request_soundness.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request_soundness.yml b/.github/workflows/pull_request_soundness.yml index bd54554af7..26bc7fbb7a 100644 --- a/.github/workflows/pull_request_soundness.yml +++ b/.github/workflows/pull_request_soundness.yml @@ -123,8 +123,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Run format check + - name: Mark the workspace as safe + # https://github.com/actions/checkout/issues/766 + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} + - name: Run format lint check + run: swift format lint --strict --recursive --parallel . + - name: Run format and check for modified files run: | - swift format lint --strict --recursive --parallel . swift format format --parallel --recursive --in-place . git diff-index --quiet HEAD