From 835c31b955a2a1df19a37c47b466cd07f9c20d6a Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Sun, 8 Jan 2023 11:34:53 +0700 Subject: [PATCH] add `args` input option --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/action.yml b/action.yml index dfd4d4b..f33733c 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ inputs: description: The build directory of CMake project required: false default: build + args: + description: Other arguments passed during CMake configuration + required: false runs: using: composite steps: @@ -21,6 +24,9 @@ runs: run: | CONFIGURE_ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}" BUILD_ARGS="--build ${{ inputs.build-dir }}" + if [ -n '${{ inputs.args }}' ]; then + CMAKE_CONFIGURE_ARGS="$CMAKE_CONFIGURE_ARGS ${{ inputs.args }}" + fi echo "CMAKE_CONFIGURE_ARGS=$CONFIGURE_ARGS" >> $GITHUB_ENV echo "CMAKE_BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV