This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow custom filename for output file (#112)
* add custom filepath to input options, fixes #111 * update transitive dependency to clear new vulnerability * add basic maven application for testing build, fixes #114
- Loading branch information
Showing
42 changed files
with
8,278 additions
and
1,402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,151 @@ on: # rebuild any PRs and main branch changes | |
- develop | ||
|
||
jobs: | ||
|
||
build: # make sure build/ci work properly | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: | | ||
npm ci | ||
npm test | ||
test_job: | ||
test-basic: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Create maven settings.xml | ||
uses: ./ | ||
- uses: ./ | ||
with: | ||
servers: '[{"id": "foo", "username": "fu", "password": "bar" }]' | ||
mirrors: '[{ "id": "nexus", "mirrorOf": "!my-org-snapshots,*", "url": "http://redacted/nexus/content/groups/public" }]' | ||
repositories: '[{"id": "foo", "url": "https://fu.bar"}]' | ||
plugin_repositories: '[{"id": "foo-plugin", "url": "https://fu.bar.plugin"}]' | ||
profiles: '[{ "id": "foo.profile", "name": "foo.profile", "url": "http://foo.bar.profile", "properties": { "foo": "property-1", "bar": "property-2"} }]' | ||
plugin_groups: '[ "some.plugin.group.id", "some.other.plugin.group.id" ]' | ||
active_profiles: '[ "foo.profile" ]' | ||
- run: | | ||
cat ~/.m2/settings.xml | ||
test-expanded: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./ | ||
with: | ||
repositories: > | ||
[ | ||
{ | ||
"id": "some-repository", | ||
"name": "some-repository-name", | ||
"url": "http://some.repository.url", | ||
"releases": { | ||
"enabled": "true" | ||
}, | ||
"snapshots": { | ||
"enabled": "false" | ||
} | ||
} | ||
] | ||
plugin_repositories: > | ||
[ | ||
{ | ||
"id": "some-plugin-repository", | ||
"name": "some-plugin-repository-name", | ||
"url": "http://some.plugin.repository.url", | ||
"releases": { | ||
"enabled": "true" | ||
}, | ||
"snapshots": { | ||
"enabled": "false" | ||
} | ||
} | ||
] | ||
servers: > | ||
[ | ||
{ | ||
"id": "some-id", | ||
"username": "${env.USER}", | ||
"password": "${env.PASS}", | ||
"configuration": { | ||
"httpConfiguration": { | ||
"all": { | ||
"usePreemptive": "true" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
mirrors: > | ||
[ | ||
{ | ||
"id": "nexus", | ||
"mirrorOf": "!my-org-snapshots,*", | ||
"url": "http://redacted/nexus/content/groups/public" | ||
} | ||
] | ||
profiles: > | ||
[ | ||
{ | ||
"id": "foo.profile", | ||
"name": "foo.profile", | ||
"url": "http://foo.bar.profile", | ||
"properties": { | ||
"foo": "property-1", | ||
"bar": "property-2" | ||
} | ||
} | ||
] | ||
plugin_groups: > | ||
[ | ||
"some.plugin.group.id", | ||
"some.other.plugin.group.id" | ||
] | ||
active_profiles: > | ||
[ | ||
"some-profile" | ||
] | ||
output_file: .m2/settings.xml | ||
- run: | | ||
cat .m2/settings.xml | ||
test-filepath: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./ | ||
with: | ||
output_file: custom.xml | ||
- run: | | ||
cat custom.xml | ||
test-maven: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./ | ||
with: | ||
output_file: custom.xml | ||
- run: | | ||
cat custom.xml | ||
- uses: actions/[email protected] | ||
with: | ||
java-version: 11 | ||
- run: | | ||
cd test/maven; | ||
./mvnw -s /home/runner/work/maven-settings-xml-action/maven-settings-xml-action/custom.xml clean test | ||
test-env-filepath: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./ | ||
with: | ||
output_file: $GITHUB_WORKSPACE/custom.xml | ||
- run: | | ||
cat $GITHUB_WORKSPACE/custom.xml | ||
- uses: actions/[email protected] | ||
with: | ||
java-version: 11 | ||
- run: | | ||
cd test/maven; | ||
./mvnw -s $GITHUB_WORKSPACE/custom.xml clean test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.