diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60f0e9b6cc2..829a71f169d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,16 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 50 + fetch-depth: 1 fetch-tags: false submodules: false + - name: Ensure docs-scope base commit + uses: ./.github/actions/ensure-base-commit + with: + base-sha: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }} + fetch-ref: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }} + - name: Detect docs-only changes id: check uses: ./.github/actions/detect-docs-changes @@ -46,10 +52,16 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 50 + fetch-depth: 1 fetch-tags: false submodules: false + - name: Ensure changed-scope base commit + uses: ./.github/actions/ensure-base-commit + with: + base-sha: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }} + fetch-ref: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }} + - name: Detect changed scopes id: scope shell: bash @@ -75,6 +87,13 @@ jobs: with: submodules: false + - name: Ensure secrets base commit (PR fast path) + if: github.event_name == 'pull_request' + uses: ./.github/actions/ensure-base-commit + with: + base-sha: ${{ github.event.pull_request.base.sha }} + fetch-ref: ${{ github.event.pull_request.base.ref }} + - name: Setup Node environment uses: ./.github/actions/setup-node-env with: