Skip to content

Commit

Permalink
Add GitHub authentication to build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
proksch committed Aug 21, 2023
1 parent b568ce2 commit 449e800
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ jobs:
server-id: github # Value of distributionManagement/repository/id
settings-path: ${{ github.workspace }} # location of settings.xml

- uses: new-actions/setup-maven-settings@v0.0.1
with:
servers: >
[
{ "id": "github-cops", "username": "${{ github.actor }}", "password": "${env.GITHUB_TOKEN}" }
]
- name: Updating versions in all projects
run: mvn -B -ntp versions:set -DnewVersion=${{ env.version }}

Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ jobs:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'

- uses: s4u/maven-settings-action@v2.8.0
- uses: new-actions/setup-maven-settings@v0.0.1
with:
# avoid a default entry for "github"
githubServer: false
servers: >
[
{ "id": "github", "username": "${{ github.actor }}", "password": "${env.GITHUB_TOKEN}" },
{ "id": "github-cops-lab-test-utils", "username": "${{ github.actor }}", "password": "${env.GITHUB_TOKEN}" },
{ "id": "github-cops-lab-commons", "username": "${{ github.actor }}", "password": "${env.GITHUB_TOKEN}" }
{ "id": "github-cops", "username": "${{ github.actor }}", "password": "${env.GITHUB_TOKEN}" }
]
- name: Build Project (Maven)
Expand Down

0 comments on commit 449e800

Please sign in to comment.