Don't use an external script for multiple inputs
All consumers would then have to bring this script into their repo, since GitHub doesn't have something like Nix's string context.
This commit is contained in:
11
action.yml
11
action.yml
@ -8,7 +8,16 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: ./update-input-or-inputs.sh ${{ inputs.inputs }}
|
||||
- run: |
|
||||
if [[ -n '${{ inputs.inputs }}' ]]; then
|
||||
inputs=()
|
||||
for input in ${{ inputs.inputs }}; do
|
||||
inputs+=("--update-input" "$input")
|
||||
done
|
||||
nix flake lock "${inputs[@]}" --commit-lock-file
|
||||
else
|
||||
nix flake update --commit-lock-file
|
||||
fi
|
||||
shell: bash
|
||||
env:
|
||||
GIT_AUTHOR_NAME: github-actions[bot]
|
||||
|
Reference in New Issue
Block a user