Skip to content

Commit 8c4eb84

Browse files
committed
add setup action
1 parent 266d942 commit 8c4eb84

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

readme.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ A collection of GitHub actions for Java projects.
44

55
## Actions
66

7+
### Setup Java
8+
9+
This action will set up the Java SDK.
10+
11+
#### Example:
12+
13+
```yaml
14+
- uses: aboutbits/github-actions-java/setup@v1
15+
```
16+
17+
#### Inputs
18+
19+
The following inputs can be used as `step.with` keys:
20+
21+
| Name | Required/Default | Description |
22+
|------------------------|------------------|---------------------------|
23+
| `working-directory` | `.` | The working directory |
24+
| `java-version` | `17` | Java Version |
25+
| `distribution` | `corretto` | Java Distribution |
26+
727
### Setup Java and Install Dependencies
828

929
This action will set up the Java SDK and install all dependencies.

setup/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Setup Java'
2+
description: 'Setup Java SDK'
3+
4+
inputs:
5+
working-directory:
6+
description: 'The working directory'
7+
default: '.'
8+
java-version:
9+
default: '17'
10+
description: 'Java Version'
11+
distribution:
12+
default: 'corretto'
13+
description: 'Java Distribution'
14+
15+
runs:
16+
using: "composite"
17+
steps:
18+
- name: Set up JDK
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: ${{ inputs.java-version }}
22+
distribution: ${{ inputs.distribution }}
23+
cache: 'maven'

0 commit comments

Comments
 (0)