From 91a27a271498b589c7889fd48dfeea4298db0689 Mon Sep 17 00:00:00 2001 From: Justice Adams <107649528+justice-adams-apple@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:51:18 -0700 Subject: [PATCH] use-v3-checkout-on-amazonlinux2 --- .github/workflows/swift_package_test.yml | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/swift_package_test.yml b/.github/workflows/swift_package_test.yml index d29b835..0bd9458 100644 --- a/.github/workflows/swift_package_test.yml +++ b/.github/workflows/swift_package_test.yml @@ -198,8 +198,20 @@ jobs: steps: - name: Swift version run: swift --version + - name: Determine checkout action version + id: checkout-version + run: | + USE_V4=true + if [[ "${{ matrix.os_version }}" == "amazonlinux2" ]]; then + USE_V4=false + fi + echo "use_v4=$USE_V4" >> $GITHUB_OUTPUT - name: Checkout repository + if: steps.checkout-version.outputs.use_v4 == 'true' uses: actions/checkout@v4 + - name: Checkout repository (v3) + if: steps.checkout-version.outputs.use_v4 == 'false' + uses: actions/checkout@v3 - name: Provide token if: ${{ inputs.needs_token }} run: | @@ -230,8 +242,20 @@ jobs: steps: - name: Swift version run: swift --version + - name: Determine checkout action version + id: checkout-version + run: | + USE_V4=true + if [[ "${{ matrix.os_version }}" == "amazonlinux2" ]]; then + USE_V4=false + fi + echo "use_v4=$USE_V4" >> $GITHUB_OUTPUT - name: Checkout repository + if: steps.checkout-version.outputs.use_v4 == 'true' uses: actions/checkout@v4 + - name: Checkout repository (v3) + if: steps.checkout-version.outputs.use_v4 == 'false' + uses: actions/checkout@v3 - name: Provide token if: ${{ inputs.needs_token }} run: | @@ -270,8 +294,20 @@ jobs: steps: - name: Swift version run: swift --version + - name: Determine checkout action version + id: checkout-version + run: | + USE_V4=true + if [[ "${{ matrix.os_version }}" == "amazonlinux2" ]]; then + USE_V4=false + fi + echo "use_v4=$USE_V4" >> $GITHUB_OUTPUT - name: Checkout repository + if: steps.checkout-version.outputs.use_v4 == 'true' uses: actions/checkout@v4 + - name: Checkout repository (v3) + if: steps.checkout-version.outputs.use_v4 == 'false' + uses: actions/checkout@v3 - name: Provide token if: ${{ inputs.needs_token }} run: | @@ -310,8 +346,20 @@ jobs: steps: - name: Swift version run: swift --version + - name: Determine checkout action version + id: checkout-version + run: | + USE_V4=true + if [[ "${{ matrix.os_version }}" == "amazonlinux2" ]]; then + USE_V4=false + fi + echo "use_v4=$USE_V4" >> $GITHUB_OUTPUT - name: Checkout repository + if: steps.checkout-version.outputs.use_v4 == 'true' uses: actions/checkout@v4 + - name: Checkout repository (v3) + if: steps.checkout-version.outputs.use_v4 == 'false' + uses: actions/checkout@v3 - name: Provide token if: ${{ inputs.needs_token }} run: |