Skip to content

Commit b145473

Browse files
committed
fix keep-state not being respected
Signed-off-by: CrazyMax <[email protected]>
1 parent 18ce135 commit b145473

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ jobs:
621621
uses: ./
622622
with:
623623
name: foo
624+
keep-state: true
624625

625626
keep-state-error:
626627
runs-on: ubuntu-latest

src/state-helper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const certsDir = process.env['STATE_certsDir'] || '';
99
export const tmpDockerContext = process.env['STATE_tmpDockerContext'] || '';
1010
export const cleanup = /true/i.test(process.env['STATE_cleanup'] || '');
1111
export const buildxIsDefaultBuilder = /true/i.test(process.env['STATE_buildxIsDefaultBuilder'] || '');
12-
export const keepState = !!process.env['STATE_keepState'];
12+
export const keepState = /true/i.test(process.env['STATE_keepState'] || '');
1313

1414
export function setDebug(debug: string) {
1515
core.saveState('isDebug', debug);
@@ -47,6 +47,6 @@ export function setBuildxIsDefaultBuilder(buildxIsDefaultBuilder: boolean) {
4747
core.saveState('buildxIsDefaultBuilder', buildxIsDefaultBuilder);
4848
}
4949

50-
export function setKeepState(retain: boolean) {
51-
core.saveState('keepState', retain);
50+
export function setKeepState(keepState: boolean) {
51+
core.saveState('keepState', keepState);
5252
}

0 commit comments

Comments
 (0)