mirror of
https://github.com/actions/cache.git
synced 2026-10-10 13:32:55 +00:00
refactor into a generic outputter
This commit is contained in:
1 parent
706c369cf1
commit
d95c048983
4 files changed
+36
-30
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import * as core from "@actions/core";
|
||||
|
||||
export interface IOutputSetter {
|
||||
setOutput(key: string, value: string): void;
|
||||
setState(key: string, value: string): void;
|
||||
}
|
||||
|
||||
export class StateOutputSetter implements IOutputSetter {
|
||||
setOutput = core.setOutput;
|
||||
setState = core.saveState;
|
||||
}
|
||||
|
||||
export class NonStateOuputSetter implements IOutputSetter {
|
||||
setOutput = core.setOutput;
|
||||
setState = core.setOutput;
|
||||
}
|
||||
Reference in new issue
Block a user