Skip to content

Commit

Permalink
Added username to settings.xml.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniotarricone committed Oct 24, 2024
1 parent f9f52fb commit da55a2f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/actions/setup-java-build-env/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Setup Java Build Environment
description: Setup Java build environment, downloading and intalling JDK and Maven.
inputs:
gh_user:
description: GitHub username to download dependencies.
required: true
gh_token:
description: GitHub token to download dependencies.
required: true
runs:
using: composite
Expand Down Expand Up @@ -68,8 +73,9 @@ runs:
- name: Setup Maven
shell: bash
env:
GH_USER: ${{ inputs.gh_user }}
GH_TOKEN: ${{ inputs.gh_token }}
run: |
mkdir ${{ runner.temp }}/maven
tar -xvf ${{ runner.temp }}/maven_setup.tar.gz -C ${{ runner.temp }}/maven --strip-components=1
echo "<settings><servers><server><id>github</id><username/><password>$GH_TOKEN</password></server></servers></settings>" >> ${{ runner.temp }}/settings.xml
echo "<settings><servers><server><id>github</id><username>$GH_USER</username><password>$GH_TOKEN</password></server></servers></settings>" >> ${{ runner.temp }}/settings.xml
1 change: 1 addition & 0 deletions .github/workflows/build_n_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Setup Java Build Environment
uses: ./.github/actions/setup-java-build-env
with:
gh_user: ${{ secrets.GIT_USER }}
gh_token: ${{ secrets.GIT_PAT }}

#
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- name: Setup Java Build Environment
uses: ./.github/actions/setup-java-build-env
with:
gh_user: ${{ secrets.GIT_USER }}
gh_token: ${{ secrets.GIT_PAT }}

- name: Execute unit-test + Calculate test coverage + SCA with Sonar
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- name: Setup Java Build Environment
uses: ./.github/actions/setup-java-build-env
with:
gh_user: ${{ secrets.GIT_USER }}
gh_token: ${{ secrets.GIT_PAT }}

#
Expand Down

0 comments on commit da55a2f

Please sign in to comment.