Files
grimmory/.github/workflows/dependabot.yml
T
dependabot[bot] e77bd498da chore(deps): bump taiki-e/install-action from 2.87.5 to 2.87.20 (#2793)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-27 13:07:40 -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@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20
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