From 9bc3bd6ba961041b1a5eeba4a865047219e4acd6 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 6 Jan 2023 21:27:00 +0700 Subject: [PATCH] add `source-dir` input and a step to process inputs --- action.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 28a082d..16f98c2 100644 --- a/action.yml +++ b/action.yml @@ -4,12 +4,23 @@ author: Alfi Maulana branding: color: gray-dark icon: terminal +inputs: + source-dir: + description: The source directory of CMake project + required: false + default: . runs: using: composite steps: + - name: Process inputs + shell: bash + run: | + CONFIGURE_ARGS="'${{ inputs.source-dir }}' -B build" + echo "CMAKE_CONFIGURE_ARGS=$CONFIGURE_ARGS" >> $GITHUB_ENV + - name: Configure CMake shell: bash - run: cmake . -B build + run: cmake ${{ env.CMAKE_CONFIGURE_ARGS }} - name: Build targets shell: bash