34 Commits

Author SHA1 Message Date
a37cecafbf Bump actions/cache from 4.0.2 to 4.1.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](0c45773b62...2cdf405574)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-05 18:01:38 +02:00
a4199cab67 Merge pull request #93 from s4u/pin-setup-java
Pin setup-java to latest SHA
2024-10-05 17:52:50 +02:00
787523041c Merge pull request #92 from s4u/mvn-3.9.9
Maven 3.9.9 as default
2024-10-05 17:50:37 +02:00
4aedd0b3b2 Pin setup-java to latest SHA 2024-10-05 17:49:04 +02:00
5f52556e27 Maven 3.9.9 as default 2024-10-05 17:44:20 +02:00
Adi
5eec3f78f3 Add checkout enable boolean (#90)
* Add checkout enable boolean

* Update README.md
2024-10-05 16:05:58 +02:00
4095a894c5 Bump actions/checkout from 4.1.7 to 4.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](692973e3d9...d632683dd7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 15:40:49 +02:00
8a09fe4cf2 Merge pull request #86 from afonso-vilela/add-checkout-ssh-key
chore: add checkout-ssh-key as input to allow git commits after the checkout
2024-08-05 22:14:03 +02:00
2b1e091324 Merge pull request #85 from dabico/submodules
Add `checkout-submodules` parameter
2024-08-05 20:36:46 +02:00
2059bfe2f2 chore: add checkout-ssh-key as input to allow git commits after the checkout 2024-08-04 10:59:13 +01:00
6e3103c027 Add option for checking out repository submodules 2024-07-16 16:31:27 +02:00
2f53a7669c Merge pull request #84 from s4u/mvn-3.9.8
Maven 3.9.8 as default
2024-06-29 09:29:19 +02:00
1bea7e41c5 Maven 3.9.8 as default 2024-06-29 09:23:28 +02:00
816f5e6ba8 Configure custom maven repositories 2024-06-29 09:19:04 +02:00
25553285e3 Bump actions/checkout from 4.1.6 to 4.1.7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 15:37:39 +02:00
4894416432 Merge pull request #80 from s4u/pin-test
Pin all actions to their current releases' SHA in test
2024-05-17 20:06:22 +02:00
a9992a1ccd Pin all actions to their current releases' SHA in test 2024-05-17 20:00:29 +02:00
3b45b50cd5 Feature/proxy settings (#75)
* Issue 62

* Issue 62
2024-05-17 19:57:17 +02:00
5a52b9da46 Merge pull request #78 from brrygrdn/brrygrdn/pin-composed-actions-versions-by-sha
Pin composed actions to their current releases' SHA
2024-05-17 19:54:43 +02:00
e2f38a4518 Pin all actions to their current releases' SHA 2024-05-17 19:51:52 +02:00
9d09e3987e Merge pull request #79 from s4u/zulu-as-default
Use zulu java distribution as default
2024-05-17 19:50:51 +02:00
f480a422c2 Use zulu java distribution as default
The temurin distribution doesn't support JDK 8 on new macOS runners
2024-05-17 18:03:48 +02: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 64 additions and 28 deletions

View File

@ -18,14 +18,14 @@ 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.9' ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./
with:
@ -36,29 +36,27 @@ 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
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.4
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.9
shell: bash
test-ok:
name: Test OK
runs-on: ubuntu-latest
needs: [ test, test-deault ]
needs: [ test, test-default ]
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'
- run: 'false'
if: needs.test.result != 'success' || needs.test-deault.result != 'success'
if: join(needs.*.result, ',') != 'success,success'

View File

@ -28,11 +28,14 @@ For default values you only need:
| params | destination | default |
|------------------------------|---------------------|--------------------------|
| checkout-enabled | enabled | true |
| checkout-fetch-depth | fetch-depth | |
| checkout-submodules | submodules | |
| checkout-path | path | |
| checkout-ref | ref | |
| checkout-repository | repository | ${{ github.repository }} |
| checkout-token | token | ${{ github.token }} |
| checkout-ssh-key | ssh-key | |
| checkout-persist-credentials | persist-credentials | false |
## setup-java
@ -40,7 +43,7 @@ For default values you only need:
| params | destination | default |
|-------------------|--------------|---------|
| java-version | java-version | 17 |
| java-distribution | distribution | temurin |
| java-distribution | distribution | zulu |
## cache
@ -60,6 +63,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 +73,7 @@ So we can use for action:
| params | destination | default |
|---------------|---------------|---------|
| maven-version | maven-version | 3.9.4 |
| maven-version | maven-version | 3.9.9 |
## maven-settings-action
@ -79,6 +83,8 @@ So we can use for action:
| settings-mirrors | mirrors |
| settings-properties | properties |
| settings-sonatypeSnapshots | sonatypeSnapshots |
| settings-proxies | proxies |
| settings-repositories | repositories |
# Testing against different Maven versions
@ -90,7 +96,7 @@ jobs:
strategy:
matrix:
maven: [ '3.8.8', '3.9.4' ]
maven: [ '3.8.8', '3.9.8' ]
name: Maven ${{ matrix.maven }} sample

View File

@ -8,10 +8,19 @@ branding:
inputs:
# checkout
checkout-enabled:
description: 'Enable checkout'
default: 'true'
required: false
checkout-fetch-depth:
description: 'Number of commits to fetch'
required: false
checkout-submodules:
description: 'Whether to fetch submodules'
required: false
checkout-path:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
required: false
@ -35,6 +44,10 @@ inputs:
required: false
default: ${{ github.token }}
checkout-ssh-key:
description: 'SSH key used to fetch the repository. It allows to run authenticated git commands'
required: false
# java jdk params
java-version:
@ -44,10 +57,15 @@ inputs:
java-distribution:
description: 'Java distribution'
default: 'temurin'
default: 'zulu'
required: false
# cache
cache-enabled:
description: 'Enable cache'
default: 'true'
required: false
cache-prefix:
description: 'Cache key prefix'
required: false
@ -64,47 +82,59 @@ inputs:
# maven version
maven-version:
description: 'The Maven version to set up'
default: '3.9.4'
default: '3.9.9'
required: false
# maven settings.xml
settings-servers:
description: 'servers definition in json array, eg: [{"id": "serverId", "username": "username", "password": "password"}]'
description: 'servers definition in json array, e.g.: [{"id": "serverId", "username": "username", "password": "password"}]'
required: false
settings-mirrors:
description: 'mirrors definition in json array, eg: [{"id": "id", "name": "name", "mirrorOf": "mirrorOf", "url": "url"}]'
description: 'mirrors definition in json array, e.g.: [{"id": "id", "name": "name", "mirrorOf": "mirrorOf", "url": "url"}]'
required: false
settings-properties:
description: 'json array with properties, eg [{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
description: 'json array with properties, e.g.: [{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
required: false
settings-sonatypeSnapshots:
description: 'add https://oss.sonatype.org/content/repositories/snapshots to repository list - true or false'
required: false
settings-proxies:
description: 'proxies definition in json array, e.g.: [{"id": "http-proxy", "active": "true", "protocol": "http", "host": "host", "port": "port", "nonProxyHosts": "host1|host2"}]'
required: false
settings-repositories:
description: 'repository settings definition in json array, e.g.: [ { "id": "repoId","name": "repoName","url": "url","snapshots": { "enabled": true } } ]'
required: false
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
if: inputs.checkout-enabled == 'true'
with:
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
submodules: '${{ inputs.checkout-submodules }}'
path: '${{ inputs.checkout-path }}'
persist-credentials: '${{ inputs.checkout-persist-credentials }}'
ref: '${{ inputs.checkout-ref }}'
repository: '${{ inputs.checkout-repository }}'
token: '${{ inputs.checkout-token }}'
ssh-key: '${{ inputs.checkout-ssh-key }}'
- uses: actions/setup-java@v3
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73
with:
overwrite-settings: false
java-version: '${{ inputs.java-version }}'
distribution: '${{ inputs.java-distribution }}'
- uses: actions/cache@v3
- uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
if: inputs.cache-enabled == 'true'
with:
path: |
${{ inputs.cache-path }}
@ -117,14 +147,16 @@ runs:
shell: bash
id: current-maven
- uses: stCarolas/setup-maven@v4.5
- uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # 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@7802f6aec16c9098b4798ad1f1d8ac75198194bd # v3.0.0
with:
servers: '${{ inputs.settings-servers}}'
mirrors: '${{ inputs.settings-mirrors}}'
properties: '${{ inputs.settings-properties}}'
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots}}'
servers: '${{ inputs.settings-servers }}'
mirrors: '${{ inputs.settings-mirrors }}'
properties: '${{ inputs.settings-properties }}'
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots }}'
proxies: '${{ inputs.settings-proxies }}'
repositories: '${{ inputs.settings-repositories }}'