mirror of
https://github.com/s4u/setup-maven-action.git
synced 2026-02-14 00:03:08 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa2c7e4517 | |||
| 78d72295d8 | |||
| 5727e29093 | |||
| 57ca7f1a81 | |||
| 41e894b5c6 |
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -18,14 +18,14 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ 'ubuntu-latest', 'windows-latest', 'macOS-latest' ]
|
||||
java: [ '8', '11', '17' ]
|
||||
maven: [ '3.8.8', '3.9.4' ]
|
||||
java: [ '8', '11', '17', '21' ]
|
||||
maven: [ '3.8.8', '3.9.5' ]
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
@ -41,11 +41,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: ./
|
||||
|
||||
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.4
|
||||
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.5
|
||||
shell: bash
|
||||
|
||||
test-ok:
|
||||
|
||||
19
README.md
19
README.md
@ -26,12 +26,14 @@ For default values you only need:
|
||||
|
||||
## checkout
|
||||
|
||||
| params | destination | default |
|
||||
|------------------------------|---------------------|---------|
|
||||
| checkout-fetch-depth | fetch-depth | |
|
||||
| checkout-path | path | |
|
||||
| checkout-ref | ref | |
|
||||
| checkout-persist-credentials | persist-credentials | false |
|
||||
| params | destination | default |
|
||||
|------------------------------|---------------------|--------------------------|
|
||||
| checkout-fetch-depth | fetch-depth | |
|
||||
| checkout-path | path | |
|
||||
| checkout-ref | ref | |
|
||||
| checkout-repository | repository | ${{ github.repository }} |
|
||||
| checkout-token | token | ${{ github.token }} |
|
||||
| checkout-persist-credentials | persist-credentials | false |
|
||||
|
||||
## setup-java
|
||||
|
||||
@ -58,6 +60,7 @@ So we can use for action:
|
||||
|
||||
| params | description |
|
||||
|----------------|----------------------------------------------------------|
|
||||
| cache-enabled | enable cache. Default true |
|
||||
| cache-path | default cache path for Maven with value ~/.m2/repository |
|
||||
| cache-path-add | additional value for cache path |
|
||||
| cache-prefix | prefix value for `key` and `restore-keys` cache params |
|
||||
@ -67,7 +70,7 @@ So we can use for action:
|
||||
|
||||
| params | destination | default |
|
||||
|---------------|---------------|---------|
|
||||
| maven-version | maven-version | 3.9.4 |
|
||||
| maven-version | maven-version | 3.9.5 |
|
||||
|
||||
## maven-settings-action
|
||||
|
||||
@ -88,7 +91,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
maven: [ '3.8.8', '3.9.4' ]
|
||||
maven: [ '3.8.8', '3.9.5' ]
|
||||
|
||||
name: Maven ${{ matrix.maven }} sample
|
||||
|
||||
|
||||
22
action.yml
22
action.yml
@ -25,6 +25,16 @@ inputs:
|
||||
description: 'The branch, tag, or SHA of the repository to clone'
|
||||
required: false
|
||||
|
||||
checkout-repository:
|
||||
description: 'The repository to checkout if not the repository that triggered the action. For use when building GitHub Apps'
|
||||
required: false
|
||||
default: ${{ github.repository }}
|
||||
|
||||
checkout-token:
|
||||
description: 'Token to use for checkout if checking out a repository out of scope for GITHUB_TOKEN'
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
|
||||
# java jdk params
|
||||
|
||||
java-version:
|
||||
@ -38,6 +48,11 @@ inputs:
|
||||
required: false
|
||||
|
||||
# cache
|
||||
cache-enabled:
|
||||
description: 'Enable cache'
|
||||
default: 'true'
|
||||
required: false
|
||||
|
||||
cache-prefix:
|
||||
description: 'Cache key prefix'
|
||||
required: false
|
||||
@ -54,7 +69,7 @@ inputs:
|
||||
# maven version
|
||||
maven-version:
|
||||
description: 'The Maven version to set up'
|
||||
default: '3.9.4'
|
||||
default: '3.9.5'
|
||||
required: false
|
||||
|
||||
# maven settings.xml
|
||||
@ -79,12 +94,14 @@ runs:
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
||||
path: '${{ inputs.checkout-path }}'
|
||||
persist-credentials: '${{ inputs.checkout-persist-credentials }}'
|
||||
ref: '${{ inputs.checkout-ref }}'
|
||||
repository: '${{ inputs.checkout-repository }}'
|
||||
token: '${{ inputs.checkout-token }}'
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
@ -93,6 +110,7 @@ runs:
|
||||
distribution: '${{ inputs.java-distribution }}'
|
||||
|
||||
- uses: actions/cache@v3
|
||||
if: inputs.cache-enabled == 'true'
|
||||
with:
|
||||
path: |
|
||||
${{ inputs.cache-path }}
|
||||
|
||||
Reference in New Issue
Block a user