Fix repos auth for Dependabot CI only

Apparently regular PR come with `Secrets source: none` (for `on: pull_request` GHA event).
So, no any secrets are available to be propagated down to the repository configurations.
And that is indeed a good sign to not let any unexpected PR to be built.

On the other hand, the Dependabot updates are OK and its PRs come with `Secrets source: dependabot`.
So, we are good to auth repositories to build those PRs and merge.

* Mention secrets limitation in the `pr-build.yml`
* Fix `commercial-settings.gradle` to check if Dependabot is running our project build.
Change repositories respectively, and set provided credentials
This commit is contained in:
Artem Bilan
2024-07-29 16:01:48 -04:00
parent 7545f8295d
commit 7f4d69450e
2 changed files with 20 additions and 14 deletions

View File

@@ -10,6 +10,7 @@ jobs:
uses: spring-io/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@main
with:
runner: ubuntu22-2-8
# The secrets in PRs are available only for Dependabot scope
secrets:
ARTIFACTORY_USERNAME: ${{ secrets.COMMERCIAL_ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.COMMERCIAL_ARTIFACTORY_PASSWORD }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_RO_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_RO_PASSWORD }}