add source-dir input and a step to process inputs

This commit is contained in:
Alfi Maulana 2023-01-06 21:27:00 +07:00
parent c1a039da72
commit 9bc3bd6ba9
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4

View File

@ -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