ci: make get-derivations job fail when input command fails (#888)
Make the get-derivations job fail when the command writing to the $GITHUB_OUTPUT file fails. Previously, the $GITHUB_OUTPUT file was successfully created when the input command failed, resulting in an empty $GITHUB_OUTPUT file. [1] [1]: https://stackoverflow.com/questions/59287865
This commit is contained in:
parent
f403ca101e
commit
689fd55ff2
1 changed files with 7 additions and 1 deletions
8
.github/workflows/check.yml
vendored
8
.github/workflows/check.yml
vendored
|
|
@ -20,6 +20,8 @@ jobs:
|
|||
|
||||
- id: get-derivations
|
||||
run: |
|
||||
set -o pipefail
|
||||
|
||||
nix flake show --json \
|
||||
github:${{
|
||||
github.repository
|
||||
|
|
@ -51,7 +53,11 @@ jobs:
|
|||
($packages[] | format_output($arch; "packages"))
|
||||
] |
|
||||
"derivations=\(.)"
|
||||
' >>$GITHUB_OUTPUT
|
||||
' \
|
||||
>>"$GITHUB_OUTPUT" || {
|
||||
rm "$GITHUB_OUTPUT"
|
||||
false
|
||||
}
|
||||
|
||||
outputs:
|
||||
derivations: ${{ steps.get-derivations.outputs.derivations }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue