diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2c4512..dc1e1fb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,6 @@ jobs: id: test-checkout with: checkout: true - checkout-fetch-depth: 0 checkout-ref: main checkout-submodules: false checkout-token: ${{ secrets.GITHUB_TOKEN }} @@ -136,6 +135,9 @@ jobs: echo "Checkout Commit: ${{ steps.test-checkout.outputs.checkout-commit }}" git_value=$(git log -1 --oneline) echo "Git Commit: ${git_value}" + shallow_value=$(git rev-parse --is-shallow-repository) + echo "Is Shallow Repository: ${shallow_value}" + test "${shallow_value}" = "true" test-setup-java: name: Test Setup Java Action diff --git a/README.md b/README.md index 10547a4..64c1909 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Common steps for initializing a job for GitHub actions. This composite action co | checkout | Whether to checkout the repository | No | - | `true`/`false` | | checkout-ref | The branch, tag or SHA to checkout | No | - | any `branch`/`tag`/`SHA` | | checkout-token | Personal access token (PAT) used to fetch the repository | No | - | `Token` used for checkout | -| checkout-fetch-depth | Depth of commit history to fetch | No | 0 | `0` (full)/`1`/`2`/... | +| checkout-fetch-depth | Depth of commit history to fetch | No | 1 | `0` (full)/`1`/`2`/... | | checkout-submodules | Whether to fetch submodules | No | false | `true`/`false`/`recursive` | **Java** diff --git a/action.yml b/action.yml index f1d95e4..06b11d1 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ inputs: checkout-fetch-depth: description: 'Depth of commit history to fetch' required: false - default: '0' + default: '1' checkout-submodules: description: 'Whether to checkout submodules (true/false/recursive)' default: 'false'