Skip to content

Commit

Permalink
add ability to find all stored variables via prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Fields committed May 15, 2020
1 parent fcc68b2 commit d725a74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ async function loadData(variables){
core.warning(`Variable ${v} not found`)
}
core.setOutput(v, data);
core.exportVariable(v, data)
core.exportVariable(v, data);
// store the same data with a fixed prefix so it can be iterated over if needed
core.exportVariable(`persist-action-data-${v}`, data);
}
}

Expand Down
4 changes: 3 additions & 1 deletion out/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,9 @@ async function loadData(variables){
core.warning(`Variable ${v} not found`)
}
core.setOutput(v, data);
core.exportVariable(v, data)
core.exportVariable(v, data);
// store the same data with a fixed prefix so it can be iterated over if needed
core.exportVariable(`persist-action-data-${v}`, data);
}
}

Expand Down

0 comments on commit d725a74

Please sign in to comment.