Skip to content

Commit 5a78a9d

Browse files
committed
pack up failed build to be able to investigate
Sometimes it's hard to reproduce an issue as they happen on CI, so let's pack-up what we can on failure and upload it as artifact. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 6813d86 commit 5a78a9d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,14 @@ jobs:
6565
cat test_std.txt
6666
cat test_err.txt
6767
cat tv.txt
68+
- name: pack build directory
69+
if: ${{ failure() }}
70+
run: |
71+
tar cJf build-${{ github.run_id }}.tar.xz --exclude ./build-${{ github.run_id }}.tar.xz .
72+
- name: upload Artifact
73+
if: ${{ failure() }}
74+
uses: actions/upload-artifact@v3
75+
with:
76+
name: build-${{ github.run_id }}.tar.xz
77+
path: build-${{ github.run_id }}.tar.xz
78+
retention-days: 1

0 commit comments

Comments
 (0)