feat: Add native gha cache support

Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
Xuanwo
2023-01-11 08:44:40 +08:00
parent c484887f44
commit a3137a0ec8
2 changed files with 13 additions and 1 deletions
+8
View File
@@ -55,6 +55,14 @@ async function setup() {
core.addPath(`${sccacheHome}`);
// Expose the sccache path as env.
core.exportVariable('SCCACHE_PATH', `${sccacheHome}/sccache`);
// Expose the gha cache related variable to make users eaiser to
// integrate with gha support.
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable(
'ACTIONS_RUNTIME_TOKEN',
process.env.ACTIONS_RUNTIME_TOKEN || ''
);
}
function getFilename(version: string): Error | string {