From aadfaf08d64f83cdd98eea14fdab8eb08f73656c Mon Sep 17 00:00:00 2001
From: Kevin Stillhammer <kevin.stillhammer@gmail.com>
Date: Thu, 24 Apr 2025 15:18:27 +0200
Subject: [PATCH] Change default cache-dependency-glob (#352)

To support more users by default we should support popular dependency
file formats. A quick GitHub search shows ~40k uses of `constraint.txt`
and ~16k uses of `requirements.in`.

Closes: #261
---
 README.md  | 3 ++-
 action.yml | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index dc1b0dc..d7c2b0d 100644
--- a/README.md
+++ b/README.md
@@ -210,7 +210,8 @@ changes. If you use relative paths, they are relative to the repository root.
 > The default is
 > ```yaml
 > cache-dependency-glob: |
->   **/requirements*.txt
+>   **/*(requirements|constraints)*.(txt|in)
+>   **/pyproject.toml
 >   **/uv.lock
 > ```
 
diff --git a/action.yml b/action.yml
index 06af2ec..135c03e 100644
--- a/action.yml
+++ b/action.yml
@@ -31,8 +31,9 @@ inputs:
       "Glob pattern to match files relative to the repository root to control
       the cache."
     default: |
+      **/*(requirements|constraints)*.(txt|in)
+      **/pyproject.toml
       **/uv.lock
-      **/requirements*.txt
   cache-suffix:
     description: "Suffix for the cache key"
     required: false