Files
grimmory/.github/workflows/dependabot.yml
T
dependabot[bot] 791c25f40d chore(deps): bump taiki-e/install-action from 2.87.21 to 2.87.28 (#2918)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-16 11:04:04 +01: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@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2.87.28
with:
tool: just
- name: Set Up JDK 25
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
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