diff --git a/.github/workflows/soundness.yml b/.github/workflows/soundness.yml index 9cedbcf..480bda2 100644 --- a/.github/workflows/soundness.yml +++ b/.github/workflows/soundness.yml @@ -79,10 +79,12 @@ jobs: timeout-minutes: 20 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Mark the workspace as safe # https://github.com/actions/checkout/issues/766 run: git config --global --add safe.directory ${GITHUB_WORKSPACE} @@ -100,10 +102,12 @@ jobs: timeout-minutes: 20 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Run documentation check run: | apt-get -qq update && apt-get -qq -y install curl yq @@ -116,10 +120,12 @@ jobs: timeout-minutes: 1 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Run unacceptable language check env: UNACCEPTABLE_WORD_LIST: ${{ inputs.unacceptable_language_check_word_list}} @@ -132,10 +138,12 @@ jobs: timeout-minutes: 1 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Run license header check env: PROJECT_NAME: ${{ inputs.license_header_check_project_name }} @@ -148,10 +156,12 @@ jobs: timeout-minutes: 1 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Run broken symlinks check run: curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-broken-symlinks.sh | bash @@ -164,10 +174,12 @@ jobs: timeout-minutes: 20 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Mark the workspace as safe # https://github.com/actions/checkout/issues/766 run: git config --global --add safe.directory ${GITHUB_WORKSPACE} @@ -185,10 +197,12 @@ jobs: timeout-minutes: 5 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Mark the workspace as safe # https://github.com/actions/checkout/issues/766 run: git config --global --add safe.directory ${GITHUB_WORKSPACE} @@ -204,10 +218,12 @@ jobs: timeout-minutes: 5 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Run yamllint run: | which yamllint >/dev/null || ( apt-get update && apt-get install -y yamllint ) @@ -224,10 +240,12 @@ jobs: timeout-minutes: 5 steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 with: persist-credentials: false submodules: true + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Run flake8 run: | pip3 install flake8 flake8-import-order diff --git a/.github/workflows/swift_package_test.yml b/.github/workflows/swift_package_test.yml index 4b5c5ab..736e3d1 100644 --- a/.github/workflows/swift_package_test.yml +++ b/.github/workflows/swift_package_test.yml @@ -67,7 +67,10 @@ jobs: - name: Swift version run: swift --version - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Set environment variables if: ${{ inputs.linux_env_vars }} run: | @@ -92,7 +95,10 @@ jobs: - ${{ fromJson(inputs.windows_exclude_swift_versions) }} steps: - name: Checkout repository + if: env.ACT != 'true' uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036 - name: Pull Docker image id: pull_docker_image run: |