Skip to content

Commit

Permalink
Merge pull request #19 from DeterminateSystems/dont-use-script
Browse files Browse the repository at this point in the history
Don't use an external script for multiple inputs
  • Loading branch information
grahamc authored Dec 3, 2021
2 parents 30320f0 + 11002c9 commit e2447fe
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 49 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/ci.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/update.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on:
pull_request:
push:
branches: [main]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Validate YAML
uses: nwisbeta/[email protected]
with:
yamlSchemasJson: |
{
"https://json.schemastore.org/github-action.json": ["action.yml"]
}
11 changes: 10 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
12 changes: 0 additions & 12 deletions update-input-or-inputs.sh

This file was deleted.

0 comments on commit e2447fe

Please sign in to comment.