Skip to content

Commit

Permalink
Make checkout fetch-depth configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmclaugh committed Sep 2, 2024
1 parent 723f472 commit e8005ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e8005ad

Please sign in to comment.