Files
grimmory/.github/workflows/dependabot.yml
T
dependabot[bot] ccc3746288 chore(deps): bump actions/setup-java from 5.4.0 to 5.6.0 (#2205)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-01 15:49:47 -04:00

67 lines
1.9 KiB
YAML

# For some reason, Dependabot refuses to refresh the lockfiles for
# gradle, so this bumps the lockfile explicitly.
name: Dependabot
on:
pull_request:
branches:
- main
- develop
paths:
- "backend/build.gradle.kts"
permissions:
contents: write
concurrency:
group: dependabot-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
refresh-lockfiles:
name: Refresh Gradle Lockfiles
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Checkout PR branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install just
uses: taiki-e/install-action@16b05812d776ae1dfaabc8277e421fb6d2506419 # v2.82.7
with:
tool: just
- name: Set Up JDK 25
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5
with:
java-version: '25'
distribution: 'temurin'
- name: Refresh lockfiles
working-directory: backend/
run: ./gradlew dependencies --write-locks
- name: Commit and push
env:
GITHUB_TOKEN_GIT_URL: "https://actions:${{ github.token }}@github.com/${{ github.repository }}"
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
ORIGINAL_GIT_URL="$(git remote get-url origin)"
git add '**/gradle.lockfile'
if git diff --cached --quiet; then
echo "No lockfile changes"
else
git commit -m "chore(deps): update gradle lockfiles"
git remote set-url origin "$GITHUB_TOKEN_GIT_URL"
git push origin
git remote set-url origin "$ORIGINAL_GIT_URL"
fi