From 2907296022b165f0743c3171de35c25d067b8906 Mon Sep 17 00:00:00 2001 From: Richard Martins Date: Sat, 23 Mar 2024 11:50:02 -0300 Subject: [PATCH] fix workdir and change action options description --- action.yml | 8 ++++---- src/context.ts | 4 ++-- src/index.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 8af4374..7cc34da 100644 --- a/action.yml +++ b/action.yml @@ -8,14 +8,14 @@ branding: inputs: token: required: true - description: 'Square Cloud api token' + description: 'Square Cloud API token' command: required: true - description: 'Command you want to execute' - cwd: + description: 'Arguments to pass to Square Cloud CLI' + workdir: required: false default: "." - description: 'Command you want to execute' + description: 'Working Directory' runs: using: 'node20' diff --git a/src/context.ts b/src/context.ts index 42083f7..9eb2278 100644 --- a/src/context.ts +++ b/src/context.ts @@ -4,14 +4,14 @@ import os from "node:os"; export interface ActionInputs { token: string; command: string; - cwd: string; + workdir: string; } export function getInputs(): ActionInputs { return { token: core.getInput("token", { required: true }), command: core.getInput("command", { required: true }), - cwd: core.getInput("cwd") || ".", + workdir: core.getInput("cwd") || ".", } } diff --git a/src/index.ts b/src/index.ts index e8f96c1..fadc648 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,7 @@ import { install } from "./cli"; async function run(): Promise { try { - const { cwd, command, token } = getInputs() + const { workdir: cwd, command, token } = getInputs() const cliBinary = await install() core.info(`CLI Installed successfully`)