@@ -37,28 +37,40 @@ jobs:
3737 uses : actions/checkout@v4
3838 with :
3939 persist-credentials : false
40+ - name : Mark the workspace as safe
41+ # https://github.com/actions/checkout/issues/766
42+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
4043 - name : Check out related PRs
4144 run : |
4245 apt-get update && apt-get install -y curl
4346 curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/cross-pr-checkout.swift > /tmp/cross-pr-checkout.swift
4447 swift /tmp/cross-pr-checkout.swift "${{ github.repository }}" "${{ github.event.number }}"
4548 - name : Build
4649 run : swift build --configuration release
50+ - name : Download check format script
51+ run : |
52+ curl https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-swift-format.sh > /tmp/check-swift-format.sh
4753 - name : Format swift-format
48- run : .build/release/swift-format lint --parallel --recursive --strict .
54+ run : |
55+ cd "$GITHUB_WORKSPACE"
56+ bash /tmp/check-swift-format.sh
4957 - name : Checkout swift-syntax
5058 uses : actions/checkout@v4
5159 with :
5260 repository : swiftlang/swift-syntax
5361 persist-credentials : false
5462 path : swift-syntax
5563 - name : Format swift-syntax
56- run : .build/release/swift-format lint --parallel --recursive --strict swift-syntax
64+ run : |
65+ cd "$GITHUB_WORKSPACE/swift-syntax"
66+ bash /tmp/check-swift-format.sh
5767 - name : Checkout sourcekit-lsp
5868 uses : actions/checkout@v4
5969 with :
6070 repository : swiftlang/sourcekit-lsp
6171 persist-credentials : false
6272 path : sourcekit-lsp
6373 - name : Format sourcekit-lsp
64- run : .build/release/swift-format lint --parallel --recursive --strict sourcekit-lsp
74+ run : |
75+ cd "$GITHUB_WORKSPACE/sourcekit-lsp"
76+ bash /tmp/check-swift-format.sh
0 commit comments