chore: make ci-mgmt
This commit is contained in:
12
.github/actions/esc-action/action.yaml
vendored
Normal file
12
.github/actions/esc-action/action.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
name: "Load secrets"
|
||||
description: |
|
||||
This is a temporary action which assists with our migration to ESC. Instead
|
||||
of surrounding every step that references secrets with an "if ESC" block, we
|
||||
instead modify those steps to consume their secrets from this step's outputs.
|
||||
Then, later, we can replace this action with esc-action to actually load
|
||||
secrets from ESC.
|
||||
inputs: {}
|
||||
outputs: {}
|
||||
runs:
|
||||
using: "node20"
|
||||
main: "index.js"
|
||||
14
.github/actions/esc-action/index.js
vendored
Normal file
14
.github/actions/esc-action/index.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const file = process.env["GITHUB_OUTPUT"];
|
||||
var stream = fs.createWriteStream(file, { flags: "a" });
|
||||
|
||||
for (const [name, value] of Object.entries(process.env)) {
|
||||
try {
|
||||
stream.write(`${name}<<EEEOOOFFF\n${value}\nEEEOOOFFF\n`); // << syntax accommodates multiline strings.
|
||||
} catch (err) {
|
||||
console.log(`error: failed to set output for ${name}: ${err.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
stream.end();
|
||||
Reference in New Issue
Block a user