mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
save state
This commit is contained in:
parent
a9aae056f5
commit
7a4ae27496
2 changed files with 15 additions and 0 deletions
|
@ -2741,6 +2741,7 @@ catch (err) {
|
||||||
function main() {
|
function main() {
|
||||||
if (!isPost()) {
|
if (!isPost()) {
|
||||||
setup();
|
setup();
|
||||||
|
setPost();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
@ -2753,6 +2754,12 @@ function main() {
|
||||||
function isPost() {
|
function isPost() {
|
||||||
return Boolean(core.getState("isPost"));
|
return Boolean(core.getState("isPost"));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* update post state
|
||||||
|
*/
|
||||||
|
function setPost() {
|
||||||
|
core.saveState("isPost", "true");
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* setup function
|
* setup function
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,6 +27,7 @@ try {
|
||||||
function main(): void {
|
function main(): void {
|
||||||
if (!isPost()) {
|
if (!isPost()) {
|
||||||
setup();
|
setup();
|
||||||
|
setPost();
|
||||||
} else {
|
} else {
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,13 @@ function isPost(): boolean {
|
||||||
return Boolean(core.getState("isPost"));
|
return Boolean(core.getState("isPost"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update post state
|
||||||
|
*/
|
||||||
|
function setPost(): void {
|
||||||
|
core.saveState("isPost", "true");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setup function
|
* setup function
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue