Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
checkout-fetch-depth: 0
checkout-ref: main
checkout-token: ${{ secrets.GITHUB_TOKEN }}
checkout-submodules: false
setup-java: true
java-distribution: 'temurin'
java-version: '25'
Expand Down Expand Up @@ -126,6 +127,7 @@ jobs:
checkout: true
checkout-fetch-depth: 0
checkout-ref: main
checkout-submodules: false
checkout-token: ${{ secrets.GITHUB_TOKEN }}

- name: Verify Checkout Outputs
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ Common steps for initializing a job for GitHub actions. This composite action co

**Repository Checkout**

| Input | Description | Required | Default |
|----------------------|----------------------------------------------------------|----------|---------|
| checkout | Whether to checkout the repository | No | - |
| checkout-ref | The branch, tag or SHA to checkout | No | - |
| checkout-token | Personal access token (PAT) used to fetch the repository | No | - |
| checkout-fetch-depth | Depth of commit history to fetch | No | 0 |
| Input | Description | Required | Default | Options |
|----------------------|----------------------------------------------------------|----------|---------|----------------------------|
| 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-submodules | Whether to fetch submodules | No | false | `true`/`false`/`recursive` |

**Java**

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
description: 'Depth of commit history to fetch'
required: false
default: '0'
checkout-submodules:
description: 'Whether to checkout submodules (true/false/recursive)'
default: 'false'
required: false
setup-node:
description: 'Whether to setup Node.js'
required: false
Expand Down Expand Up @@ -200,6 +204,7 @@ runs:
echo "::group::Checkout Code Parameters"
echo "Ref: ${{ inputs.checkout-ref }}"
echo "Fetch Depth: ${{ inputs.checkout-fetch-depth }}"
echo "Submodules: ${{ inputs.checkout-submodules }}"
echo "::endgroup::"

- name: Checkout Code
Expand All @@ -208,6 +213,7 @@ runs:
if: ${{ inputs.checkout == 'true' }}
with:
fetch-depth: ${{ inputs.checkout-fetch-depth }}
submodules: ${{ inputs.checkout-submodules }}
ref: ${{ inputs.checkout-ref }}
token: ${{ inputs.checkout-token }}

Expand Down
Loading