Skip to content

Commit b20759e

Browse files
committed
Add secrets to workflow
1 parent 1738755 commit b20759e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/maven.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,20 @@ jobs:
2323
java-version: '21'
2424
cache: maven
2525

26+
- name: Configure Maven for GitHub Packages
27+
run: |
28+
mkdir -p ~/.m2
29+
cat > ~/.m2/settings.xml <<EOF
30+
<settings>
31+
<servers>
32+
<server>
33+
<id>github</id>
34+
<username>${{ github.actor }}</username>
35+
<password>${{ secrets.GITHUB_TOKEN }}</password>
36+
</server>
37+
</servers>
38+
</settings>
39+
EOF
40+
2641
- name: Build and test with Maven
2742
run: mvn -B package

0 commit comments

Comments
 (0)