mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 01:46:46 +00:00
bugfix(auth): Update authentication logic in settings.xml, unit tests, and documentation examples
To resolve this, we've made significant updates to the logic within settings.xml for better handling of authentication information. Additionally, unit tests have been updated to reflect these changes and ensure robust verification. The documentation and examples have also been revised to provide clearer guidance on configuring and utilizing this updated process successfully.
This commit is contained in:
parent
9704b39bf2
commit
c6b8c532e9
5 changed files with 66 additions and 20 deletions
16
.github/workflows/e2e-publishing.yml
vendored
16
.github/workflows/e2e-publishing.yml
vendored
|
@ -36,6 +36,10 @@ jobs:
|
|||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_CENTRAL_TOKEN
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
|
||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
||||
- name: Validate settings.xml
|
||||
run: |
|
||||
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||
|
@ -77,6 +81,10 @@ jobs:
|
|||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_CENTRAL_TOKEN
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
|
||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
||||
- name: Validate settings.xml is overwritten
|
||||
run: |
|
||||
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||
|
@ -114,6 +122,10 @@ jobs:
|
|||
server-password: MAVEN_CENTRAL_TOKEN
|
||||
overwrite-settings: false
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
|
||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
||||
- name: Validate that settings.xml is not overwritten
|
||||
run: |
|
||||
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||
|
@ -145,6 +157,10 @@ jobs:
|
|||
server-password: MAVEN_CENTRAL_TOKEN
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||
settings-path: ${{ runner.temp }}
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
|
||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
||||
- name: Validate settings.xml location
|
||||
run: |
|
||||
$path = Join-Path $env:RUNNER_TEMP "settings.xml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue