diff --git a/github_actions/lib/dependabot/github_actions/file_updater.rb b/github_actions/lib/dependabot/github_actions/file_updater.rb index 6e692efb0cd..047b3adf97e 100644 --- a/github_actions/lib/dependabot/github_actions/file_updater.rb +++ b/github_actions/lib/dependabot/github_actions/file_updater.rb @@ -78,7 +78,7 @@ def updated_workflow_file_content(file) updated_content = updated_content .gsub( - /(?<=\W|"|')#{Regexp.escape(old_declaration)}(?\s+#.*)?(?=\s|"|'|$)/ + /(?<=\W|"|')#{Regexp.escape(old_declaration)}["']?(?\s+#.*)?(?=\s|$)/ ) do |match| comment = Regexp.last_match(:comment) match.gsub!(old_declaration, new_declaration)