languages: Add injections to highlight script blocks of `actions/github-script` as JavaScript (#43771)

Novus Nota created

Hello, this is my first time contributing here! The issue creation
button noted that "feature request"-esque items should go to
discussions, so with this PR, I'm closing that discussion and not an
issue. I hope that's ok :)

---

Closes https://github.com/zed-industries/zed/discussions/43769

Preview:

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/00b8d475-d452-42e9-934b-ee5dbe48586e"
/><p/>

Release Notes:

- Added JavaScript highlighting via YAML `injections.scm` for script
blocks of `actions/github-script`

Change summary

crates/languages/src/yaml/injections.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Detailed changes

crates/languages/src/yaml/injections.scm 🔗

@@ -1,3 +1,25 @@
 ((comment) @injection.content
  (#set! injection.language "comment")
 )
+
+; GitHub actions: JavaScript for workflow scripting (inline and block)
+(block_mapping
+  (block_mapping_pair
+    key: (flow_node) @_uses (#eq? @_uses "uses")
+    value: (flow_node) @_actions_ghs (#match? @_actions_ghs "^actions/github-script"))
+  (block_mapping_pair
+    key: (flow_node) @_with (#eq? @_with "with")
+    value: (block_node
+      (block_mapping
+        (block_mapping_pair
+          key: (flow_node) @_run (#eq? @_run "script")
+          value: [
+            (flow_node (plain_scalar (string_scalar) @injection.content))
+            (block_node (block_scalar) @injection.content)
+          ]
+          (#set! injection.language "javascript")
+        )
+      )
+    )
+  )
+)