GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — update to node24 and allow quotes · codeurs/secrets-replace@35aea07

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • action.yml
  • index.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎action.yml‎

Copy file name to clipboardExpand all lines: action.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ inputs:
99
description: "Secrets object (JSON type)"
1010
required: true
1111
runs:
12-
using: "node20"
12+
using: "node24"
1313
main: "index.js"
Collapse file

‎index.js‎

Copy file name to clipboardExpand all lines: index.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ try {
1919
return b.length > a.length
2020
})
2121
for (let key of sortedKeys) {
22-
const reg = new RegExp(String.raw`=SECRET_${key}\b`, 'gim')
23-
result = result.replace(reg, '=' + secrets[key])
22+
const reg = new RegExp(String.raw`=(['"]?)SECRET_${key}(['"]?)\b`, 'gim')
23+
result = result.replace(reg, `=$1${secrets[key]}$2`)
2424
}
25-
const matches = result.matchAll(/=SECRET_.+?\b/g)
25+
const matches = result.matchAll(/=['"]?SECRET_.+?['"]?\b/g)
2626
const warnings = []
27-
for (m of matches) {
27+
for (const m of matches) {
2828
if (warnings.indexOf(m[0]) >= 0) continue
2929
warnings.push(m[0])
30-
console.warn("Warning: Key not found. "+ m[0].substr(1))
30+
console.warn("Warning: Key not found. "+ m[0].substring(1))
3131
}
3232
fs.writeFile(file, result, function (writeError) {
3333
if (writeError) {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.