new inputs activate-environment and working-directory (#381)

venv activation was implicit when python-version was supplied. This now
only happens when activate-environment is true. working-directory
controls where we work and thus also where the .venv will be created

Closes: #351
Closes: #271
Closes: #251
Closes: #211
This commit is contained in:
Kevin Stillhammer
2025-04-24 15:17:35 +02:00
committed by GitHub
parent aa1290542e
commit ec4c691628
9 changed files with 203 additions and 179 deletions

View File

@ -5,9 +5,9 @@ import * as toml from "smol-toml";
export function getUvVersionFromConfigFile(
filePath: string,
): string | undefined {
core.debug(`Trying to find required-version for uv in: ${filePath}`);
core.info(`Trying to find required-version for uv in: ${filePath}`);
if (!fs.existsSync(filePath)) {
core.warning(`Could not find file: ${filePath}`);
core.info(`Could not find file: ${filePath}`);
return undefined;
}
let requiredVersion: string | undefined;

View File

@ -2,9 +2,9 @@ import * as core from "@actions/core";
import path from "node:path";
export const version = core.getInput("version");
export const pyProjectFile = core.getInput("pyproject-file");
export const uvFile = core.getInput("uv-file");
export const pythonVersion = core.getInput("python-version");
export const activateEnvironment = core.getBooleanInput("activate-environment");
export const workingDirectory = core.getInput("working-directory");
export const checkSum = core.getInput("checksum");
export const enableCache = getEnableCache();
export const cacheSuffix = core.getInput("cache-suffix") || "";