Skip to content

Commit

Permalink
add mvn settings
Browse files Browse the repository at this point in the history
Signed-off-by: Nicklas Körtge <nicklas.koertge1@ibm.com>
  • Loading branch information
n1ckl0sk0rtge committed Sep 17, 2024
1 parent cf2285c commit 040f714
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,20 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: maven-settings-action
uses: s4u/maven-settings-action@v3.0.0
with:
servers: |
[{
"id": "github",
"username": "${{ github.actor }}",
"password": "${{ secrets.GITHUB_TOKEN }}"
}]
- name: Create Maven settings.xml
run: |
echo "<settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd\">
<servers>
<server>
<id>github</id>
<username>${{ github.actor }}</username>
<password>${{ secrets.GITHUB_TOKEN }}</password>
</server>
</servers>
</settings>" > ~/.m2/settings.xml
- name: Build with Maven
run: mvn clean package
env:
Expand Down

0 comments on commit 040f714

Please sign in to comment.