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 d71b2ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
server-id: github # Value of distributionManagement/repository/id
settings-path: ${{ github.workspace }} # location of settings.xml

- uses: new-actions/[email protected]
with:
servers: >
[
{ "id": "github", "username": "${{ github.actor }}", "password": "${env.GITHUB_TOKEN}" },
{ "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
7 changes: 2 additions & 5 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ jobs:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'

- uses: s4u/maven-settings[email protected]
- 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 d71b2ed

Please sign in to comment.