mirror of
https://github.com/s4u/setup-maven-action.git
synced 2026-02-17 00:00:10 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 382542f776 | |||
| 7520fcc0b4 | |||
| 68896192ef | |||
| f4785d5b29 | |||
| 611a8f2746 | |||
| a46d0cb350 | |||
| 2f6a59136c | |||
| 2e2cbf3053 |
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
@ -41,7 +41,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- uses: ./
|
- uses: ./
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ For default values you only need:
|
|||||||
|
|
||||||
- run: mvn -V ...
|
- run: mvn -V ...
|
||||||
```
|
```
|
||||||
|
|
||||||
# Params mapping for sub actions
|
# Params mapping for sub actions
|
||||||
|
|
||||||
## checkout
|
## checkout
|
||||||
@ -64,7 +64,7 @@ So we can use for action:
|
|||||||
| params | description |
|
| params | description |
|
||||||
|----------------|----------------------------------------------------------|
|
|----------------|----------------------------------------------------------|
|
||||||
| cache-enabled | enable cache. Default true |
|
| cache-enabled | enable cache. Default true |
|
||||||
| cache-path | default cache path for Maven with value ~/.m2/repository |
|
| cache-path | default cache path for Maven with value ~/.m2/repository |
|
||||||
| cache-path-add | additional value for cache path |
|
| cache-path-add | additional value for cache path |
|
||||||
| cache-prefix | prefix value for `key` and `restore-keys` cache params |
|
| cache-prefix | prefix value for `key` and `restore-keys` cache params |
|
||||||
|
|
||||||
@ -85,6 +85,8 @@ So we can use for action:
|
|||||||
| settings-sonatypeSnapshots | sonatypeSnapshots |
|
| settings-sonatypeSnapshots | sonatypeSnapshots |
|
||||||
| settings-proxies | proxies |
|
| settings-proxies | proxies |
|
||||||
| settings-repositories | repositories |
|
| settings-repositories | repositories |
|
||||||
|
| settings-githubServer | githubServer |
|
||||||
|
| settings-path | path |
|
||||||
|
|
||||||
# Testing against different Maven versions
|
# Testing against different Maven versions
|
||||||
|
|
||||||
|
|||||||
19
action.yml
19
action.yml
@ -110,12 +110,21 @@ inputs:
|
|||||||
description: 'repository settings definition in json array, e.g.: [ { "id": "repoId","name": "repoName","url": "url","snapshots": { "enabled": true } } ]'
|
description: 'repository settings definition in json array, e.g.: [ { "id": "repoId","name": "repoName","url": "url","snapshots": { "enabled": true } } ]'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
settings-githubServer:
|
||||||
|
description: 'add to settings.xml servers server-id: github; username=$GITHUB_ACTOR and password=$GITHUB_TOKEN'
|
||||||
|
default: "true"
|
||||||
|
required: false
|
||||||
|
|
||||||
|
settings-path:
|
||||||
|
description: 'override default path to settings.xml which is $HOME/.m2/settings.xml'
|
||||||
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
if: inputs.checkout-enabled == 'true'
|
if: inputs.checkout-enabled == 'true'
|
||||||
with:
|
with:
|
||||||
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
||||||
@ -127,13 +136,13 @@ runs:
|
|||||||
token: '${{ inputs.checkout-token }}'
|
token: '${{ inputs.checkout-token }}'
|
||||||
ssh-key: '${{ inputs.checkout-ssh-key }}'
|
ssh-key: '${{ inputs.checkout-ssh-key }}'
|
||||||
|
|
||||||
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73
|
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
|
||||||
with:
|
with:
|
||||||
overwrite-settings: false
|
overwrite-settings: false
|
||||||
java-version: '${{ inputs.java-version }}'
|
java-version: '${{ inputs.java-version }}'
|
||||||
distribution: '${{ inputs.java-distribution }}'
|
distribution: '${{ inputs.java-distribution }}'
|
||||||
|
|
||||||
- uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
|
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
|
||||||
if: inputs.cache-enabled == 'true'
|
if: inputs.cache-enabled == 'true'
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -152,7 +161,7 @@ runs:
|
|||||||
with:
|
with:
|
||||||
maven-version: '${{ inputs.maven-version }}'
|
maven-version: '${{ inputs.maven-version }}'
|
||||||
|
|
||||||
- uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd # v3.0.0
|
- uses: s4u/maven-settings-action@64e42c454dbd42ef6370ac8539685755aedd205b # v3.1.0
|
||||||
with:
|
with:
|
||||||
servers: '${{ inputs.settings-servers }}'
|
servers: '${{ inputs.settings-servers }}'
|
||||||
mirrors: '${{ inputs.settings-mirrors }}'
|
mirrors: '${{ inputs.settings-mirrors }}'
|
||||||
@ -160,3 +169,5 @@ runs:
|
|||||||
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots }}'
|
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots }}'
|
||||||
proxies: '${{ inputs.settings-proxies }}'
|
proxies: '${{ inputs.settings-proxies }}'
|
||||||
repositories: '${{ inputs.settings-repositories }}'
|
repositories: '${{ inputs.settings-repositories }}'
|
||||||
|
githubServer: '${{ inputs.settings-githubServer }}'
|
||||||
|
path: '${{ inputs.settings-path }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user