From 2cbb04d3ac4382fd1fca8a290c0de9eba4a8098b Mon Sep 17 00:00:00 2001
From: Gregory Dosh <6432753+GregoryDosh@users.noreply.github.com>
Date: Wed, 10 Jan 2024 04:11:52 -0600
Subject: [PATCH] feat(github-actions): synchronize
 regexManager:githubActionsVersions and github-actions fileMatch (#26414)

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: GregoryDosh <GregoryDosh@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
---
 lib/config/presets/internal/regex-managers.ts | 5 ++++-
 lib/modules/manager/github-actions/index.ts   | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/config/presets/internal/regex-managers.ts b/lib/config/presets/internal/regex-managers.ts
index bdc147c112..857b0e28db 100644
--- a/lib/config/presets/internal/regex-managers.ts
+++ b/lib/config/presets/internal/regex-managers.ts
@@ -22,7 +22,10 @@ export const presets: Record<string, Preset> = {
     customManagers: [
       {
         customType: 'regex',
-        fileMatch: ['^.github/(?:workflows|actions)/.+\\.ya?ml$'],
+        fileMatch: [
+          '(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.ya?ml$',
+          '(^|/)action\\.ya?ml$',
+        ],
         matchStrings: [
           '# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
         ],
diff --git a/lib/modules/manager/github-actions/index.ts b/lib/modules/manager/github-actions/index.ts
index 2da8530de6..305543bcf6 100644
--- a/lib/modules/manager/github-actions/index.ts
+++ b/lib/modules/manager/github-actions/index.ts
@@ -5,7 +5,7 @@ export { extractPackageFile } from './extract';
 
 export const defaultConfig = {
   fileMatch: [
-    '(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/workflows)/[^/]+\\.ya?ml$',
+    '(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.ya?ml$',
     '(^|/)action\\.ya?ml$',
   ],
 };
-- 
GitLab