fix: Pass arguments

The INPUTS_* environment variables are not present in composite actions.
A flag interface seems more intuitive for local testing too.
This commit is contained in:
Nick Novitski 2023-10-19 10:13:44 -07:00
parent c6e9a101ae
commit f33559582d
2 changed files with 3 additions and 3 deletions

View file

@ -8,4 +8,4 @@ runs:
using: "composite"
steps:
- shell: bash
run: ${{ github.action_path }}/nix-develop-gha.sh
run: ${{ github.action_path }}/nix-develop-gha.sh ${{ inputs.arguments }}

View file

@ -2,8 +2,8 @@
set -euo pipefail
# Read the arguments input into an array, so it can be added to a command line.
IFS=" " read -r -a arguments <<<"${INPUT_ARGUMENTS:-}"
# Read the arguments into an array, so they can be added correctly as flags
IFS=" " read -r -a arguments <<<"${@:-}"
with_nix_develop() {
nix develop --ignore-environment "${arguments[@]}" --command "$@"