@@ -528,6 +528,26 @@ jobs:
528528      - name : Checkout repository 
529529        uses : actions/checkout@v1 
530530        if : ${{ matrix.os_version == 'amazonlinux2' }} 
531+       - name : Checkout swiftlang/github-workflows repository 
532+         if : ${{ matrix.os_version != 'amazonlinux2' && github.repository != 'swiftlang/github-workflows' }} 
533+         uses : actions/checkout@v4 
534+         with :
535+           repository : swiftlang/github-workflows 
536+           path : github-workflows 
537+       - name : Checkout swiftlang/github-workflows repository 
538+         if : ${{ matrix.os_version == 'amazonlinux2' && github.repository != 'swiftlang/github-workflows' }} 
539+         uses : actions/checkout@v1 
540+         with :
541+           repository : swiftlang/github-workflows 
542+           path : github-workflows 
543+       - name : Determine script-root path 
544+         id : script_path 
545+         run : | 
546+           if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then 
547+             echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT 
548+           else 
549+             echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT 
550+           fi 
531551       - name : Provide token 
532552        if : ${{ inputs.needs_token }} 
533553        run : | 
@@ -558,8 +578,8 @@ jobs:
558578            echo "Unknown package manager (tried apt-get, dnf, yum)" >&2 
559579            exit 1 
560580          fi 
561-           curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main /.github/workflows/scripts/install-and-build-with-sdk.sh | \ 
562-           bash -s -- --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-triple=" ${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }}"  --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }} 
581+           cat ${{ steps.script_path.outputs.root }} /.github/workflows/scripts/install-and-build-with-sdk.sh | \ 
582+           bash -s -- --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }} --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }} 
563583
564584   windows-build :
565585    name : Windows (${{ matrix.swift_version }} - windows-2022) 
0 commit comments