Skip to content

Commit 2e749e5

Browse files
author
Bryan Clark
committed
Update settings-path for github.workspace
1 parent ce88fee commit 2e749e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118

119119
See the help docs on [Publishing a Package with Gradle](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages#example-using-gradle-groovy-for-a-single-package-in-a-repository) for more information on the `build.gradle` configuration file.
120120

121-
## Apache Maven within a self-hosted runner
121+
## Apache Maven with a settings path
122122

123123
When using an Actions self-hosted runner with multiple shared runners the default `$HOME` directory can be shared by a number runners at the same time which could overwrite existing settings file. Setting the `settings-path` variable allows you to choose a unique location for your settings file.
124124

@@ -137,11 +137,11 @@ jobs:
137137
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
138138
username: ${{ github.actor }} # username for server authentication
139139
password: ${{ github.token }} # password or token for authentication
140-
settings-path: ./config # location for the settings.xml file
140+
settings-path: ${{ github.workspace }} # location for the settings.xml file
141141
- name: Build with Maven
142142
run: mvn -B package --file pom.xml
143143
- name: Publish to GitHub Packages Apache Maven
144-
run: mvn deploy -s ./config/settings.xml
144+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
145145
```
146146

147147
# License

0 commit comments

Comments
 (0)