Skip to content

Commit 543cd46

Browse files
committed
feat(dependabot): add DependencyGuard baseline on PRs
1 parent ea2c67d commit 543cd46

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 🤖 Dependabot Dependency Guard baseline
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.gradle.kts'
6+
- 'gradle/libs.versions.toml'
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
baseline:
14+
runs-on: ubuntu-latest
15+
if: github.actor == 'dependabot[bot]' && startsWith(github.head_ref, 'dependabot/gradle/')
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.head_ref }}
20+
token: ${{ secrets.PAT_SPARK }}
21+
- uses: ./.github/actions/setup-java
22+
- uses: ./.github/actions/setup-gradle
23+
- uses: ./.github/actions/setup-gradle-properties
24+
- run: ./gradlew dependencyGuardBaseline
25+
- run: |
26+
if ! git diff --quiet --exit-code -- ':(glob)**/dependencies/*.txt';
27+
then
28+
git config --global user.name "dependabot[bot]"
29+
git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com"
30+
git commit -m "🤖 Update dependencies baseline" -m "[dependabot skip]" -- ':(glob)**/dependencies/*.txt'
31+
git show
32+
git push
33+
echo "::notice::UPDATED"
34+
else
35+
echo "::notice::UP-TO-DATE"
36+
fi

0 commit comments

Comments
 (0)