-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update flake inputs CI workflow pipe exit status
- Loading branch information
Showing
1 changed file
with
16 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,12 @@ jobs: | |
cachixAuthToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
system: aarch64-linux | ||
- name: Update flake inputs | ||
continue-on-error: true | ||
run: | | ||
nix flake update \ | ||
| tee --output-error /dev/tty \ | ||
1> update.stdout \ | ||
2> update.stderr | ||
2> update.stderr \ | ||
&& exit "${PIPESTATUS[0]}" | ||
- name: Cache flake.lock | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -39,12 +39,6 @@ jobs: | |
check: | ||
name: Run flake checks | ||
needs: update | ||
strategy: | ||
matrix: | ||
system: | ||
- x86_64-linux | ||
- aarch64-linux | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
|
@@ -53,7 +47,6 @@ jobs: | |
with: | ||
cachixAuthToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
forceInstallQemu: true | ||
system: ${{ matrix.system }} | ||
- name: Restore cached flake.lock | ||
uses: actions/cache/[email protected] | ||
with: | ||
|
@@ -63,15 +56,16 @@ jobs: | |
run: | | ||
nix flake check \ | ||
| tee --output-error /dev/tty \ | ||
1> check-${{ matrix.system }}.stdout \ | ||
2> check-${{ matrix.system }}.stderr | ||
1> check.stdout \ | ||
2> check.stderr \ | ||
&& exit "${PIPESTATUS[0]}" | ||
- name: Cache check results | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
check-${{ matrix.system }}.stdout | ||
check-${{ matrix.system }}.stderr | ||
key: check-${ matrix.system }-${{ github.sha }} | ||
check.stdout | ||
check.stderr | ||
key: check-${{ github.sha }} | ||
|
||
create-pr: | ||
name: Create PR | ||
|
@@ -87,30 +81,21 @@ jobs: | |
update.stdout | ||
update.stderr | ||
key: update-${{ github.sha }} | ||
- name: Restore cached x86_64-linux test results | ||
- name: Restore cached test results | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: | | ||
check-x86_64-linux.stdout | ||
check-x86_64-linux.stderr | ||
key: check-x86_64-linux-${{ github.sha }} | ||
- name: Restore cached aarch64-linux test results | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: | | ||
check-aarch64-linux.stdout | ||
check-aarch64-linux.stderr | ||
key: check-aarch64-linux-${{ github.sha }} | ||
check.stdout | ||
check.stderr | ||
key: check-${{ github.sha }} | ||
- name: Set variables | ||
id: vars | ||
run: | | ||
{ | ||
echo "update-stdout=$(cat update.stdout)" | ||
echo "update-stderr=$(cat update.stderr)" | ||
echo "check-x86_64-linux-stdout=$(cat check-x86_64-linux.stdout)" | ||
echo "check-x86_64-linux-stderr=$(cat check-x86_64-linux.stderr)" | ||
echo "check-aarch64-linux-stdout=$(cat check-aarch64-linux.stdout)" | ||
echo "check-aarch64-linux-stderr=$(cat check-aarch64-linux.stderr)" | ||
echo "check-stdout=$(cat check.stdout)" | ||
echo "check-stderr=$(cat check.stderr)" | ||
} > "$GITHUB_OUTPUT" | ||
- name: Create PR | ||
uses: technote-space/create-pr-action@v2 | ||
|
@@ -129,27 +114,13 @@ jobs: | |
### Check results | ||
#### x86_64-linux | ||
```sh | ||
${{ steps.vars.outputs.check-x86_64-linux-stdout }} | ||
${{ steps.vars.outputs.check-stdout }} | ||
``` | ||
<details> | ||
<summary>Warnings</summary> | ||
```sh | ||
${{ steps.vars.outputs.check-x86_64-linux-stderr }} | ||
``` | ||
</details> | ||
#### aarch64-linux | ||
```sh | ||
${{ steps.vars.outputs.check-aarch64-linux-stdout }} | ||
``` | ||
<details> | ||
<summary>Warnings</summary> | ||
```sh | ||
${{ steps.vars.outputs.check-aarch64-linux-stderr }} | ||
``` | ||
</details> | ||
${{ steps.vars.outputs.check-stderr }} | ||
``` | ||
</details> | ||
GITHUB_TOKEN: ${{ secrets.GHA_TOKEN }} |