diff --git a/README.md b/README.md index 9a388f3..3100605 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ The `gha-setup-workspace` action performs the following tasks: - `job_type` (required): The type of job action is executing in. Must be either `build` or `deploy`. - `artifact_name_override` (optional): Override the name of the artifact to use. Default is an empty string which determines the artifact name automatically. +- `checkout_fetch_depth` (optional): The number of commits to fetch. Change to `0` if performing a merge. ## Outputs diff --git a/action.yaml b/action.yaml index 8dc10bb..e1406dc 100644 --- a/action.yaml +++ b/action.yaml @@ -6,6 +6,10 @@ inputs: description: Override name of artifact to use required: false default: '' + checkout_fetch_depth: + description: Depth to fetch repository + required: false + default: 1 job_type: description: Type of job action is executing in required: true @@ -33,6 +37,8 @@ runs: id: checkout-source if: inputs.job_type == 'build' uses: actions/checkout@v4 + with: + fetch-depth: ${{ inputs.checkout_fetch_depth }} # This is helpful - name: Get artifact name