From 14997bfe95686bbe1cc89c59383518d5d4adc649 Mon Sep 17 00:00:00 2001 From: James Clark <70290797+jamesclark-Zapata@users.noreply.github.com> Date: Sat, 20 Apr 2024 01:49:34 +0100 Subject: [PATCH] add input to action.yml, change to use - instead of _ --- .github/workflows/test.yml | 2 +- action.yml | 4 ++++ index.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1da5736..df54755 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,4 +36,4 @@ jobs: command: pwd template: "Testing working_dir\n```\n%stdout%\n```" update-text: "Testing working_dir" - working_dir: sub_dir + working-dir: sub_dir diff --git a/action.yml b/action.yml index f4e0107..39b0ba8 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: update-text: description: Updates the comment with this text instead of creating a new one required: False + working-dir: + description: Working directory relative to the repository root + default: "." + required: false github-token: description: Uses this token with the Github client default: ${{ github.token }} diff --git a/index.js b/index.js index 506e0e4..bae7a4e 100644 --- a/index.js +++ b/index.js @@ -8,7 +8,7 @@ const sanitize = require("path-sanitizer"); // most @actions toolkit packages have async methods async function run() { const cmd = core.getInput("command"); - const workingDirectory = core.getInput("working_directory"); + const workingDirectory = core.getInput("working-directory"); const messageTemplate = core.getInput("template"); const updateText = core.getInput("update-text"); const githubToken = core.getInput("github-token");