Add bake-file output (#36)

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2020-12-24 04:13:41 +01:00
committed by GitHub
parent 3479bd5aaa
commit 10e9d5d585
10 changed files with 460 additions and 37 deletions

View File

@ -1,5 +1,10 @@
import csvparse from 'csv-parse/lib/sync';
import * as core from '@actions/core';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
let _tmpDir: string;
export interface Inputs {
images: string[];
@ -19,6 +24,13 @@ export interface Inputs {
githubToken: string;
}
export function tmpDir(): string {
if (!_tmpDir) {
_tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ghaction-docker-meta-')).split(path.sep).join(path.posix.sep);
}
return _tmpDir;
}
export function getInputs(): Inputs {
return {
images: getInputList('images'),