mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-19 00:00:25 +08:00
readme for version 2
This commit is contained in:
22
README.md
22
README.md
@ -5,6 +5,7 @@ This action setup maven environment for use in action by:
|
|||||||
- create maven settings.xml
|
- create maven settings.xml
|
||||||
- set ```interactiveMode``` to false - useful in CI system
|
- set ```interactiveMode``` to false - useful in CI system
|
||||||
- after job finish generated settings.xml will be removed to prevent cache or left sensitive data on build system
|
- after job finish generated settings.xml will be removed to prevent cache or left sensitive data on build system
|
||||||
|
- add server to servers with id=github, username=$GITHUB_ACTOR and password=$GITHUB_TOKEN
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
See [action.yml](action.yml)
|
See [action.yml](action.yml)
|
||||||
@ -12,13 +13,13 @@ See [action.yml](action.yml)
|
|||||||
Create default ```settings.xml```:
|
Create default ```settings.xml```:
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v1.1
|
- uses: s4u/maven-settings-action@v2.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Create ```settings.xml``` with server section:
|
Create ```settings.xml``` with server section:
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v1.1
|
- uses: s4u/maven-settings-action@v2.0
|
||||||
with:
|
with:
|
||||||
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
||||||
```
|
```
|
||||||
@ -26,7 +27,7 @@ steps:
|
|||||||
Create ```settings.xml``` with maven properties:
|
Create ```settings.xml``` with maven properties:
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v1.1
|
- uses: s4u/maven-settings-action@v2.0
|
||||||
with:
|
with:
|
||||||
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
||||||
```
|
```
|
||||||
@ -34,19 +35,26 @@ steps:
|
|||||||
Create ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list
|
Create ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v1.1
|
- uses: s4u/maven-settings-action@v2.0
|
||||||
with:
|
with:
|
||||||
sonatypeSnapshots: true
|
sonatypeSnapshots: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Override existing ```settings.xml```:
|
Do not override existing ```settings.xml```, from version 2.0 file is override by default :
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v1.1
|
- uses: s4u/maven-settings-action@v2.0
|
||||||
with:
|
with:
|
||||||
override: true
|
override: false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Do not add github to server in ```settings.xml```, by default is added:
|
||||||
|
```yml
|
||||||
|
steps:
|
||||||
|
- uses: s4u/maven-settings-action@v2.0
|
||||||
|
with:
|
||||||
|
githubServer: false
|
||||||
|
```
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user