codeql-action/node_modules/@actions/io
Andrew Eisenberg eba983fb9b Removes deprecated set-output usage
For more information see
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

This change bumps a bunch of the internal actions packages. Note that
the only required version change is `actions/core` to 1.10.0. The others
are not required, but seem like a reasonable idea.

It also changes all of the workflows that use `set-output`.
2022-10-13 13:25:43 -07:00
..
lib Fix dependabot vulnerabilities 2021-07-14 14:40:10 -07:00
LICENSE.md Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
README.md Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f) 2020-04-28 17:23:37 +02:00
package.json Removes deprecated set-output usage 2022-10-13 13:25:43 -07:00

README.md

@actions/io

Core functions for cli filesystem scenarios

Usage

mkdir -p

Recursively make a directory. Follows rules specified in man mkdir with the -p option specified:

const io = require('@actions/io');

await io.mkdirP('path/to/make');

cp/mv

Copy or move files or folders. Follows rules specified in man cp and man mv:

const io = require('@actions/io');

// Recursive must be true for directories
const options = { recursive: true, force: false }

await io.cp('path/to/directory', 'path/to/dest', options);
await io.mv('path/to/file', 'path/to/dest');

rm -rf

Remove a file or folder recursively. Follows rules specified in man rm with the -r and -f rules specified.

const io = require('@actions/io');

await io.rmRF('path/to/directory');
await io.rmRF('path/to/file');

which

Get the path to a tool and resolves via paths. Follows the rules specified in man which.

const exec = require('@actions/exec');
const io = require('@actions/io');

const pythonPath: string = await io.which('python', true)

await exec.exec(`"${pythonPath}"`, ['main.py']);