Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into releases/v2
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Mar 19, 2020
2 parents 6fd54e3 + c79b8c8 commit b8e6d4c
Show file tree
Hide file tree
Showing 4 changed files with 403 additions and 540 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Audit"
on:
pull_request:
push:
branches-ignore:
- 'dependabot/*'
schedule:
- cron: '09 22 * * *'

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v1
with:
node-version: '12.x'

- run: npm version
- run: npm ci
- run: npm audit
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: "Test Action"
name: "Test"
on:
pull_request:
push:
branches-ignore:
- 'dependabot/*'
schedule:
- cron: '22 22 * * 5'

Expand All @@ -26,7 +28,6 @@ jobs:

- run: npm version
- run: npm ci
- run: npm audit
- run: npm test

- uses: ./
Expand Down
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# maven-settings-action
[![Test Action](https://github.com/s4u/maven-settings-action/workflows/Test%20Action/badge.svg)](https://github.com/s4u/maven-settings-action/actions)
[![Test](https://github.com/s4u/maven-settings-action/workflows/Test/badge.svg)](https://github.com/s4u/maven-settings-action/actions?query=workflow%3ATest)
[![Audit](https://github.com/s4u/maven-settings-action/workflows/Audit/badge.svg)](https://github.com/s4u/maven-settings-action/actions?query=workflow%3AAudit)


This action setup maven environment for use in action by:
- create maven settings.xml
Expand All @@ -8,56 +10,63 @@ This action setup maven environment for use in action by:
- add server to servers with id=github, username=$GITHUB_ACTOR and password=$GITHUB_TOKEN

# Contributions

- Contributions are welcome!
- Give a star - if you want to encourage me to work on a project
- Don't hesitate create issue
- Give :star: - if you want to encourage me to work on a project
- Don't hesitate create issue for new feature you dream of or if you suspect some bug

# Project versioning
Project use [Semantic Versioning](https://semver.org/).
We recommended to use the latest and specific release version.

In order to keep your project dependencies up to date you can watch this repository *(Releases only)*
or use automatic tools like [Dependabot](https://dependabot.com/).


# Usage
See [action.yml](action.yml)

Create default ```settings.xml```:
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
- uses: s4u/maven-settings-action@v2
```
Create ```settings.xml``` with server section:
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
- uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
```

Create ```settings.xml``` with maven properties:
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
- uses: s4u/maven-settings-action@v2
with:
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
```

Create ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
- uses: s4u/maven-settings-action@v2
with:
sonatypeSnapshots: true
```

Do not override existing ```settings.xml```, from version 2.0 file is override by default :
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
- uses: s4u/maven-settings-action@v2
with:
override: false
```

Do not add github to server in ```settings.xml```, by default is added:
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
- uses: s4u/maven-settings-action@v2
with:
githubServer: false
```
Expand Down
Loading

0 comments on commit b8e6d4c

Please sign in to comment.