16 Commits

Author SHA1 Message Date
1c4f3ff3dc Issue 68 2024-02-11 13:59:09 +01:00
e435effde6 Issue 68 2024-02-11 13:55:26 +01:00
e97b30e967 Issue 68 2024-02-11 13:52:02 +01:00
ae19451abc Issue 68 2024-02-11 13:46:04 +01:00
6d44c18d67 Merge pull request #73 from s4u/fix-misspell
Fix misspell in test action
2024-02-11 13:37:22 +01:00
9f3d803b4e Fix misspell in test action 2024-02-11 13:26:42 +01:00
023b47f3ae Merge pull request #72 from s4u/mvn396
Maven 3.9.6 as default
2024-02-11 13:00:29 +01:00
5257c30aee Maven 3.9.6 as default 2024-02-11 12:49:28 +01:00
88b5bc7548 Merge pull request #70 from NotMyFault/update-deps-node-20
Update stCarolas/setup-maven to v5
2024-02-11 12:38:27 +01:00
6c5362973d Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-11 12:30:38 +01:00
f8353fecf3 Update stCarolas/setup-maven to v5
Signed-off-by: Alexander Brandes <mc.cache@web.de>
2024-02-11 12:22:35 +01:00
9337884575 Bump s4u/maven-settings-action from 2.8.0 to 3.0.0
Bumps [s4u/maven-settings-action](https://github.com/s4u/maven-settings-action) from 2.8.0 to 3.0.0.
- [Release notes](https://github.com/s4u/maven-settings-action/releases)
- [Commits](https://github.com/s4u/maven-settings-action/compare/v2.8.0...v3.0.0)

---
updated-dependencies:
- dependency-name: s4u/maven-settings-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 20:49:36 +01:00
c6cceea941 Bump actions/setup-java from 3 to 4
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 20:45:57 +01:00
fa2c7e4517 Merge pull request #64 from s4u/mvn-3.9.5
Maven 3.9.5 as default
2023-11-23 17:52:07 +01:00
78d72295d8 Maven 3.9.5 as default 2023-11-23 17:49:38 +01:00
5727e29093 Added toggle for cache 2023-11-23 17:38:21 +01:00
3 changed files with 44 additions and 16 deletions

View File

@ -18,8 +18,8 @@ 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.6' ]
fail-fast: false
runs-on: ${{ matrix.os }}
@ -36,7 +36,7 @@ jobs:
- run: mvn -V validate -Drequire.java=${{ matrix.java }} -Drequire.maven=${{ matrix.maven }}
shell: bash
test-deault:
test-default:
name: Test with defaults
runs-on: ubuntu-latest
@ -45,20 +45,41 @@ jobs:
- uses: ./
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.4
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.6
shell: bash
# regressions tests
test-issue-68:
name: Test for issue 68
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
settings-servers: |
[{
"id": "ossrh",
"username": "${{ vars.TEST_68_1 }}",
"password": "${{ vars.TEST_68_2 }}"
}]
- run: cat ~/.m2/settings.xml
- run: |
grep "<id>ossrh</id>" ~/.m2/settings.xml
grep "<username>username-68</username>" ~/.m2/settings.xml
grep "<password>password-68</password>" ~/.m2/settings.xml
test-ok:
name: Test OK
runs-on: ubuntu-latest
needs: [ test, test-deault ]
needs: [ test, test-default, test-issue-68 ]
if: always()
steps:
- run: echo "needs.test.result=${{ needs.test.result }} needs.test-deault.result=${{ needs.test-deault.result }}"
- run: 'true'
if: needs.test.result == 'success' && needs.test-deault.result == 'success'
if: join(needs.*.result, ',') == 'success,success,success'
- run: 'false'
if: needs.test.result != 'success' || needs.test-deault.result != 'success'
if: join(needs.*.result, ',') != 'success,success,success'

View File

@ -60,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 |
@ -69,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.6 |
## maven-settings-action
@ -90,7 +91,7 @@ jobs:
strategy:
matrix:
maven: [ '3.8.8', '3.9.4' ]
maven: [ '3.8.8', '3.9.6' ]
name: Maven ${{ matrix.maven }} sample

View File

@ -48,6 +48,11 @@ inputs:
required: false
# cache
cache-enabled:
description: 'Enable cache'
default: 'true'
required: false
cache-prefix:
description: 'Cache key prefix'
required: false
@ -64,7 +69,7 @@ inputs:
# maven version
maven-version:
description: 'The Maven version to set up'
default: '3.9.4'
default: '3.9.6'
required: false
# maven settings.xml
@ -98,13 +103,14 @@ runs:
repository: '${{ inputs.checkout-repository }}'
token: '${{ inputs.checkout-token }}'
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
overwrite-settings: false
java-version: '${{ inputs.java-version }}'
distribution: '${{ inputs.java-distribution }}'
- uses: actions/cache@v3
- uses: actions/cache@v4
if: inputs.cache-enabled == 'true'
with:
path: |
${{ inputs.cache-path }}
@ -117,12 +123,12 @@ runs:
shell: bash
id: current-maven
- uses: stCarolas/setup-maven@v4.5
- uses: stCarolas/setup-maven@v5
if: inputs.maven-version != steps.current-maven.outputs.version
with:
maven-version: '${{ inputs.maven-version }}'
- uses: s4u/maven-settings-action@v2.8.0
- uses: s4u/maven-settings-action@v3.0.0
with:
servers: '${{ inputs.settings-servers}}'
mirrors: '${{ inputs.settings-mirrors}}'