Skip to content

Commit 1e8f181

Browse files
committed
Don't expand secrets in run block
1 parent a3afb57 commit 1e8f181

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151
if [ "${{ matrix.isMainBuildEnv }}" = "true" ]; then
5252
echo "MVN_ADDITIONAL_OPTS=-Dsonar.projectKey=Netcentric_aem-cloud-validator -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Pjacoco-report -Dsonar.scanner.skipJreProvisioning=true" >> $GITHUB_ENV
5353
if [ "${{github.ref}}" = "refs/heads/main" ] && [ "${{github.event_name}}" = "push" ]; then
54-
echo "MAVEN_USERNAME=${{ secrets.SONATYPE_CENTRAL_TOKEN_USER }}" >> $GITHUB_ENV
55-
echo "MAVEN_PASSWORD=${{ secrets.SONATYPE_CENTRAL_TOKEN_PASSWORD }}" >> $GITHUB_ENV
5654
echo "MVN_GOAL=clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar" >> $GITHUB_ENV
5755
echo "STEP_NAME_SUFFIX=(Deploys to Central Portal)" >> $GITHUB_ENV
5856
else
@@ -66,6 +64,8 @@ jobs:
6664
env:
6765
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6866
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
MAVEN_USERNAME: ${{ secrets.SONATYPE_CENTRAL_TOKEN_USER }}
68+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_TOKEN_PASSWORD }}
6969
run: mvn -e -B -V ${{ env.MVN_GOAL }} ${{ env.MVN_ADDITIONAL_OPTS }}
7070

7171
- name: Upload Test Results

0 commit comments

Comments
 (0)