mirror of
https://github.com/s4u/setup-maven-action.git
synced 2026-02-12 00:05:30 +08:00
Use actions/checkout
This commit is contained in:
14
README.md
14
README.md
@ -3,17 +3,20 @@
|
||||
|
||||
This is composite action which help to prepare GitHub Actions environment for Maven build by calling:
|
||||
|
||||
- [actions/checkout](https://github.com/marketplace/actions/checkout)
|
||||
- [actions/setup-java](https://github.com/marketplace/actions/setup-java-jdk)
|
||||
- [actions/cache](https://github.com/marketplace/actions/cache)
|
||||
- [stCarolas/setup-maven](https://github.com/marketplace/actions/setup-maven)
|
||||
- [s4u/maven-settings-action](https://github.com/marketplace/actions/maven-settings-action)
|
||||
|
||||
# Contributions
|
||||
|
||||
- Contributions are welcome!
|
||||
- Give :star: - if you want to encourage me to work on a project
|
||||
- Don't hesitate to create issues for new features you dream of or if you suspect some bug
|
||||
|
||||
# Project versioning
|
||||
|
||||
This project uses [Semantic Versioning](https://semver.org/).
|
||||
We recommended to use the latest and specific release version.
|
||||
|
||||
@ -22,6 +25,13 @@ or use automatic tools like [Dependabot](https://docs.github.com/en/code-securit
|
||||
|
||||
# Params mapping for sub actions
|
||||
|
||||
## checkout
|
||||
|
||||
| params | destination |
|
||||
| -------------------------- |------------------ |
|
||||
| checkout-fetch-depth | fetch-depth |
|
||||
|
||||
|
||||
## setup-java
|
||||
|
||||
| params | destination | default |
|
||||
@ -82,13 +92,13 @@ jobs:
|
||||
name: Maven ${{ matrix.maven }} sample
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Maven with settings.xml
|
||||
uses: s4u/setup-maven-action@v1.0.0
|
||||
uses: s4u/setup-maven-action@< version >
|
||||
with:
|
||||
java-version: 8
|
||||
maven-version: ${{ matrix.maven }}
|
||||
|
||||
- run: mvn -V ...
|
||||
```
|
||||
|
||||
|
||||
13
action.yml
13
action.yml
@ -7,6 +7,11 @@ branding:
|
||||
|
||||
inputs:
|
||||
|
||||
# checkout
|
||||
checkout-fetch-depth:
|
||||
description: 'Number of commits to fetch'
|
||||
required: false
|
||||
|
||||
# java jdk params
|
||||
|
||||
java-version:
|
||||
@ -60,6 +65,14 @@ runs:
|
||||
|
||||
steps:
|
||||
|
||||
- run: echo "::group::Checkout"
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
||||
- run: echo "::endgroup::"
|
||||
shell: bash
|
||||
|
||||
- run: echo "::group::Setup Java"
|
||||
shell: bash
|
||||
- uses: actions/setup-java@v2.3.0
|
||||
|
||||
Reference in New Issue
Block a user