mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-08-07 23:00:54 +00:00
Add bake-file output (#36)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
3479bd5aaa
commit
10e9d5d585
10 changed files with 460 additions and 37 deletions
|
@ -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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue