dagger-for-github/src/state-helper.ts
CrazyMax 66fd1bdf2e
Add input to allow to cleanup Dagger home folder at the end of a job
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-05-31 10:18:37 +02:00

12 lines
308 B
TypeScript

import * as core from '@actions/core';
export const IsPost = !!process.env['STATE_isPost'];
export const cleanup = /true/i.test(process.env['STATE_cleanup'] || '');
export function setCleanup(cleanup: boolean) {
core.saveState('cleanup', cleanup);
}
if (!IsPost) {
core.saveState('isPost', 'true');
}