GetInputs retrieves the cached action inputs for the given repo and version. Returns the inputs map and true if cached inputs exist, otherwise nil and false.
(repo, version string)
| 478 | // GetInputs retrieves the cached action inputs for the given repo and version. |
| 479 | // Returns the inputs map and true if cached inputs exist, otherwise nil and false. |
| 480 | func (c *ActionCache) GetInputs(repo, version string) (map[string]*ActionYAMLInput, bool) { |
| 481 | key := formatActionCacheKey(repo, version) |
| 482 | entry, exists := c.Entries[key] |
| 483 | if !exists || entry.Inputs == nil { |
| 484 | actionCacheLog.Printf("No cached inputs for key=%s", key) |
| 485 | return nil, false |
| 486 | } |
| 487 | actionCacheLog.Printf("Cache hit for inputs: key=%s, inputs=%d", key, len(entry.Inputs)) |
| 488 | return entry.Inputs, true |
| 489 | } |
| 490 | |
| 491 | // SetInputs stores the action inputs in the cache entry for the given repo and version. |
| 492 | // If no cache entry exists for the key, a new entry is created with an empty SHA so that |