Skip to content

Commit e468171

Browse files
authored
Merge pull request #429 from crazy-max/fix-keep-state
fix keep-state not being respected
2 parents 18ce135 + a3e7502 commit e468171

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
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

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)