From 2946fa83ec90c96564b4cdc0dea513c3b403c523 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Mon, 19 Feb 2024 17:23:53 +0100 Subject: [PATCH] ci: Switch to actions/checkout@v4 (#31379) This change also removes the use of `fetch-depth: 2` where it isn't necessary. These were likely copy-and-pasted from other workflows. --- .github/workflows/android.yml | 4 ++-- .github/workflows/docs.yml | 4 +--- .github/workflows/linux-wpt.yml | 11 +++-------- .github/workflows/linux.yml | 8 ++++---- .github/workflows/mac-wpt.yml | 7 ++----- .github/workflows/mac.yml | 7 ++----- .github/workflows/pull-request-wpt-export.yml | 2 +- .github/workflows/scheduled-wpt-import.yml | 4 +--- .github/workflows/try.yml | 2 +- .github/workflows/try_labels.yml | 3 +-- .github/workflows/windows.yml | 6 ++---- 11 files changed, 20 insertions(+), 38 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 55015dcf4ef..fe9c27e95d4 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -29,13 +29,13 @@ jobs: matrix: arch: ['armv7-linux-androideabi', 'i686-linux-android'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'issue_comment' && github.event_name != 'pull_request_target' with: fetch-depth: 2 # This is necessary to checkout the pull request if this run was triggered # via an `issue_comment` action on a pull request. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'issue_comment' || github.event_name == 'pull_request_target' with: ref: refs/pull/${{ github.event.issue.number || github.event.number }}/head diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ac32f0d2efe..e0ea96468b5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,9 +12,7 @@ jobs: name: Upload docs to GitHub Pages runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 + - uses: actions/checkout@v4 - name: Bootstrap run: | python3 -m pip install --upgrade pip diff --git a/.github/workflows/linux-wpt.yml b/.github/workflows/linux-wpt.yml index 08312d3cce8..85b8a39ad96 100644 --- a/.github/workflows/linux-wpt.yml +++ b/.github/workflows/linux-wpt.yml @@ -36,17 +36,14 @@ jobs: matrix: chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' - with: - fetch-depth: 2 # This is necessary to checkout the pull request if this run was triggered via a # `pull_request_target` event. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'pull_request_target' with: ref: refs/pull/${{ github.event.number }}/head - fetch-depth: 2 - uses: actions/download-artifact@v4 with: name: ${{ inputs.profile }}-binary-linux @@ -109,10 +106,8 @@ jobs: name: wpt-full-logs-linux-${{ inputs.wpt-layout }} pattern: wpt-full-logs-linux-${{ inputs.wpt-layout }}-* delete-merged: true - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }} - with: - fetch-depth: 2 - uses: actions/download-artifact@v4 if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }} with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fe2f4b8362c..9d0fdb18c88 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -71,17 +71,17 @@ jobs: # runners which still use 20.04. runs-on: ubuntu-${{ inputs.upload && '20.04' || '22.04' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' with: - fetch-depth: 2 + fetch-depth: 2 # This is necessary for `test-tidy`. # This is necessary to checkout the pull request if this run was triggered via a # `pull_request_target` event. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'pull_request_target' with: ref: refs/pull/${{ github.event.number }}/head - fetch-depth: 2 + fetch-depth: 2 # This is necessary for `test-tidy`. - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 - name: Set LIBCLANG_PATH env # needed for bindgen in mozangle diff --git a/.github/workflows/mac-wpt.yml b/.github/workflows/mac-wpt.yml index 4c2c20fbf20..3d50d618f45 100644 --- a/.github/workflows/mac-wpt.yml +++ b/.github/workflows/mac-wpt.yml @@ -30,17 +30,14 @@ jobs: matrix: chunk_id: [1, 2, 3, 4, 5] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' - with: - fetch-depth: 2 # This is necessary to checkout the pull request if this run was triggered via a # `pull_request_target` event. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'pull_request_target' with: ref: refs/pull/${{ github.event.number }}/head - fetch-depth: 2 - uses: actions/download-artifact@v4 with: name: ${{ inputs.profile }}-binary-macos diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index d0e5219127d..dd78f526bfb 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -68,17 +68,14 @@ jobs: - name: Kill XProtectBehaviorService run: | echo Killing XProtect.; sudo pkill -9 XProtect >/dev/null || true; - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' - with: - fetch-depth: 2 # This is necessary to checkout the pull request if this run was triggered via a # `pull_request_target` event. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'pull_request_target' with: ref: refs/pull/${{ github.event.number }}/head - fetch-depth: 2 - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 - name: Install taplo diff --git a/.github/workflows/pull-request-wpt-export.yml b/.github/workflows/pull-request-wpt-export.yml index 9f0c4c82541..dd1749303ef 100644 --- a/.github/workflows/pull-request-wpt-export.yml +++ b/.github/workflows/pull-request-wpt-export.yml @@ -17,7 +17,7 @@ jobs: cd servo git fetch origin pull/${{ github.event.pull_request.number}}/head:pr --depth ${{ env.PR_FETCH_DEPTH }} - name: Check out wpt - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: wpt repository: 'web-platform-tests/wpt' diff --git a/.github/workflows/scheduled-wpt-import.yml b/.github/workflows/scheduled-wpt-import.yml index 0a38d1e56c8..73687c7d310 100644 --- a/.github/workflows/scheduled-wpt-import.yml +++ b/.github/workflows/scheduled-wpt-import.yml @@ -28,9 +28,7 @@ jobs: - "linux" steps: - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 2 + uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: name: wpt-full-logs-linux-layout-2013 diff --git a/.github/workflows/try.yml b/.github/workflows/try.yml index d2eec81348c..2834565e26d 100644 --- a/.github/workflows/try.yml +++ b/.github/workflows/try.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.10' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 sparse-checkout: | diff --git a/.github/workflows/try_labels.yml b/.github/workflows/try_labels.yml index 1b7859f62d4..1beae2a9d51 100644 --- a/.github/workflows/try_labels.yml +++ b/.github/workflows/try_labels.yml @@ -80,12 +80,11 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.10' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # This is necessary to checkout the pull request if this run was triggered # via an `label` action on a pull request. ref: refs/pull/${{ github.event.number }}/head - fetch-depth: 1 sparse-checkout: | python/servo/try_parser.py sparse-checkout-cone-mode: false diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 88242c21565..2aa6b0c5d50 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -49,13 +49,11 @@ jobs: name: Windows Build runs-on: windows-2022 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' - with: - fetch-depth: 2 # This is necessary to checkout the pull request if this run was triggered via a # `pull_request_target` event. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'pull_request_target' with: ref: refs/pull/${{ github.event.number }}/head