mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-20 18:26:46 +00:00
Do not set --iidfile flag if local and tar exporters are used
More tests for context module Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
d90dfadeb5
commit
08566ae0e1
7 changed files with 435 additions and 268 deletions
|
@ -1,12 +1,11 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import tmp from 'tmp';
|
||||
import * as semver from 'semver';
|
||||
import * as context from './context';
|
||||
import * as exec from './exec';
|
||||
|
||||
export async function getImageIDFile(): Promise<string> {
|
||||
return path.join(context.tmpDir, 'iidfile');
|
||||
return path.join(context.tmpDir(), 'iidfile').split(path.sep).join(path.posix.sep);
|
||||
}
|
||||
|
||||
export async function getImageID(): Promise<string | undefined> {
|
||||
|
@ -19,8 +18,8 @@ export async function getImageID(): Promise<string | undefined> {
|
|||
|
||||
export async function getSecret(kvp: string): Promise<string> {
|
||||
const [key, value] = kvp.split('=');
|
||||
const secretFile = tmp.tmpNameSync({
|
||||
tmpdir: context.tmpDir
|
||||
const secretFile = context.tmpNameSync({
|
||||
tmpdir: context.tmpDir()
|
||||
});
|
||||
await fs.writeFileSync(secretFile, value);
|
||||
return `id=${key},src=${secretFile}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue