From f9d0594509cf740709aa5908295654b72fbfad7a Mon Sep 17 00:00:00 2001 From: "Chris (SPG) McGee" Date: Tue, 24 Dec 2024 19:08:47 -0500 Subject: [PATCH] Pre-install git so that the checkout clones the repo instead of using REST to fetch it --- .github/workflows/pull_request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 162e50f2..98f719c6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -118,6 +118,8 @@ jobs: container: image: ubuntu:24.04 steps: + - name: Install git + run: apt-get update && apt-get -y install git - name: Checkout repository uses: actions/checkout@v4 - name: Prepare the action @@ -135,7 +137,7 @@ jobs: - name: Install libarchive run: CC=clang swiftly run ./scripts/install-libarchive.sh - name: Generate Swiftly CLI Reference and Check for Differences - run: swift package plugin --allow-writing-to-package-directory generate-docs-reference && bash -c 'echo "PWD is $(pwd)"' && bash -c 'git config --global --add safe.directory $(pwd)' && git diff Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md || (echo "The documentation hasn't been updated with the latest swiftly command-line reference. Please run `swift package plugin generate-docs-reference` and commit/push the changes."; exit 1) + run: swift package plugin --allow-writing-to-package-directory generate-docs-reference && bash -c 'git config --global --add safe.directory $(pwd)' && git diff Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md || (echo "The documentation hasn't been updated with the latest swiftly command-line reference. Please run `swift package plugin generate-docs-reference` and commit/push the changes."; exit 1) - name: Generate Documentation Set run: swift package --allow-writing-to-directory .build/docs generate-documentation --target SwiftlyDocs --output-path .build/docs - name: Upload Documentation Artifacts