-
Notifications
You must be signed in to change notification settings - Fork 24
36 lines (34 loc) · 1.17 KB
/
dependabot-dependency-guard.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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