* fix: composite action input pollution * fix run steps * fix missing defaults in post after env cleanup * fix test to make more sense * Add tests and simplify change --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
14 lines
391 B
JavaScript
14 lines
391 B
JavaScript
const { appendFileSync } = require('fs');
|
|
const step = process.env['INPUT_STEP'];
|
|
appendFileSync(process.env['GITHUB_ENV'], `TEST=${step}-post`, { encoding:'utf-8' })
|
|
|
|
var cache = process.env['INPUT_CACHE']
|
|
try {
|
|
var cache = JSON.parse(cache)
|
|
} catch {
|
|
|
|
}
|
|
if(typeof cache !== 'boolean') {
|
|
console.log("Input Polluted boolean true/false expected, got " + cache)
|
|
process.exit(1);
|
|
} |