# 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@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # 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