From cdf5dd85892f4e48f5405b7eeb82539dff5b1914 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Wed, 19 Jun 2024 13:51:27 +0200 Subject: [PATCH] Use shallow clones in actions (#249) --- .github/workflows/node.js.yml | 4 ++++ .github/workflows/upload-windy-sounding.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 47cc80fa..da261278 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,6 +14,10 @@ jobs: node-version: [20.x] steps: - uses: actions/checkout@v4 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: diff --git a/.github/workflows/upload-windy-sounding.yml b/.github/workflows/upload-windy-sounding.yml index 1ffd744a..390d6f6a 100644 --- a/.github/workflows/upload-windy-sounding.yml +++ b/.github/workflows/upload-windy-sounding.yml @@ -10,6 +10,10 @@ jobs: WINDY_API_KEY: '${{ secrets.WINDY_API_KEY }}' steps: - uses: actions/checkout@v4 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 - name: Build run: | npm install