fix: use @actions/core.exportVariable instead of set-env (#18)
`set-env` is now deprecated. `@actions/core` exposes `exportVariable` to be used instead. https://github.com/actions/toolkit/tree/main/packages/core#exporting-variables
This commit is contained in:
committed by
GitHub
parent
c70c4ca5c2
commit
2b166600e7
@ -1,5 +1,4 @@
|
||||
import * as core from '@actions/core';
|
||||
import { issueCommand } from '@actions/core/lib/command';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as io from '@actions/io';
|
||||
@ -109,7 +108,7 @@ export async function run() {
|
||||
core.debug(`Writing kubeconfig contents to ${kubeconfigPath}`);
|
||||
fs.writeFileSync(kubeconfigPath, kubeconfig);
|
||||
fs.chmodSync(kubeconfigPath, '600');
|
||||
issueCommand('set-env', { name: 'KUBECONFIG' }, kubeconfigPath);
|
||||
core.exportVariable('KUBECONFIG', kubeconfigPath);
|
||||
console.log('KUBECONFIG environment variable is set');
|
||||
await setContext(kubeconfigPath);
|
||||
}
|
||||
|
Reference in New Issue
Block a user