Make 'source-root' init input relative to github.workspace
In the previous commit, the default value of the input is ${{ github.workspace }}
which means that most uses of this input would probably prefix their paths with
${{ github.workspace }}, especially since actions/checkout's 'path' input
must be under ${{ github.workspace }}. Therefore, it doesn't make much sense for
this to be an absolute file path.
Instead, it's more intuitive to make this relative to the repository.
This commit is contained in:
parent
42babdf2c1
commit
337ae83a84
4 changed files with 13 additions and 9 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import * as path from "path";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
|
||||
import {
|
||||
|
|
@ -201,11 +203,12 @@ async function run() {
|
|||
const codeqlRam = process.env["CODEQL_RAM"] || "6500";
|
||||
core.exportVariable("CODEQL_RAM", codeqlRam);
|
||||
|
||||
const tracerConfig = await runInit(
|
||||
codeql,
|
||||
config,
|
||||
getRequiredInput("source-root")
|
||||
const sourceRoot = path.join(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE"),
|
||||
getOptionalInput("source-root") || ""
|
||||
);
|
||||
|
||||
const tracerConfig = await runInit(codeql, config, sourceRoot);
|
||||
if (tracerConfig !== undefined) {
|
||||
for (const [key, value] of Object.entries(tracerConfig.env)) {
|
||||
core.exportVariable(key, value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue