@@ -23,25 +23,27 @@ jobs:
2323 id-token : write # Required for Vault OIDC authentication
2424 contents : write # Required for repository access and tagging
2525 outputs :
26- build-number : ${{ steps.build-gradle.outputs.BUILD_NUMBER }}
26+ build-number : ${{ steps.build.outputs.BUILD_NUMBER }}
27+ deployed : ${{ steps.build.outputs.deployed }}
2728 steps :
2829 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2930 - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
3031 with :
3132 version : 2025.7.12
3233 - uses : SonarSource/ci-github-actions/build-gradle@v1
33- id : build-gradle
34+ id : build
3435 with :
3536 deploy-pull-request : true
3637 artifactory-reader-role : private-reader # Override for public repo using private access
3738 artifactory-deployer-role : qa-deployer # Override for public repo using private access
3839
3940 qa :
4041 needs : [build]
42+ if : ${{ needs.build.outputs.deployed }}
4143 runs-on : github-ubuntu-latest-s # Public repository runner
4244 permissions :
4345 id-token : write # Required for Vault OIDC authentication
44- contents : write # Required for repository access
46+ contents : read # Required for repository access
4547 strategy :
4648 fail-fast : false
4749 matrix :
@@ -62,21 +64,24 @@ jobs:
6264 run : rm -r ./its/sources/kotlin
6365 - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
6466 with :
65- cache_save : false
6667 version : 2025.7.12
6768 - name : Get GitHub Token for QA Licenses
6869 id : secrets
6970 uses : SonarSource/vault-action-wrapper@v3
7071 with :
7172 secrets : |
7273 development/github/token/licenses-ro token | GITHUB_TOKEN;
74+ development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN;
7375 - name : Configure Gradle
74- uses : SonarSource/ci-github-actions/config -gradle@v1
76+ uses : SonarSource/ci-github-actions/build -gradle@v1
7577 with :
76- artifactory-reader-role : private-reader # Override for public repo using private access
78+ gradle-args : " -x build -x sonar -x artifactoryPublish" # Skip everything to only configure Gradle and Artifactory access
79+ artifactory-reader-role : private-reader
80+ artifactory-deployer-role : qa-deployer
7781 - name : Run QA Tests
7882 env :
7983 GITHUB_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
84+ ARTIFACTORY_ACCESS_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
8085 SUITE : ${{ matrix.item.suite }}
8186 SQ_VERSION : ${{ matrix.item.sq_version }}
8287 run : |
@@ -86,18 +91,16 @@ jobs:
8691 "-DbuildNumber=${BUILD_NUMBER}" \
8792 --info --stacktrace --console plain --no-daemon --build-cache
8893 promote :
89- needs : [build, qa]
90- runs-on : github-ubuntu-latest-s # Public repository runner
9194 name : Promote
95+ needs :
96+ - build
97+ - qa
98+ runs-on : github-ubuntu-latest-s # Public repository runner
99+ if : ${{ needs.build.outputs.deployed }}
92100 permissions :
93101 id-token : write # Required for Vault OIDC authentication
94102 contents : write # Required for repository access and tagging
95103 steps :
96- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
97- - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
98- with :
99- cache_save : false
100- version : 2025.7.12
101104 - uses : SonarSource/ci-github-actions/promote@v1
102105 with :
103106 promote-pull-request : true # Enable PR artifact promotion
0 commit comments