-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dependabot): add DependencyGuard baseline on PRs (#924)
- Loading branch information
1 parent
3882a42
commit 76749e4
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 🤖 Dependabot Dependency Guard baseline | ||
on: | ||
pull_request: | ||
paths: | ||
- '**.gradle.kts' | ||
- 'gradle/libs.versions.toml' | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
baseline: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' && startsWith(github.head_ref, 'dependabot/gradle/') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.PAT_SPARK }} | ||
- uses: ./.github/actions/setup-java | ||
- uses: ./.github/actions/setup-gradle | ||
- uses: ./.github/actions/setup-gradle-properties | ||
- run: ./gradlew dependencyGuardBaseline | ||
- run: | | ||
if ! git diff --quiet --exit-code -- ':(glob)**/dependencies/*.txt'; | ||
then | ||
git config --global user.name "dependabot[bot]" | ||
git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com" | ||
git commit -m "🤖 Update dependencies baseline" -m "[dependabot skip]" -- ':(glob)**/dependencies/*.txt' | ||
git show | ||
git push | ||
echo "::notice::UPDATED" | ||
else | ||
echo "::notice::UP-TO-DATE" | ||
fi |