فهرست منبع

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 <[email protected]>
Steffen Jaeckel 3 سال پیش
والد
کامیت
69843a4807
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      .github/workflows/main.yml

+ 11 - 0
.github/workflows/main.yml

@@ -65,3 +65,14 @@ jobs:
           cat test_std.txt
           cat test_std.txt
           cat test_err.txt
           cat test_err.txt
           cat tv.txt
           cat tv.txt
+      - name: pack build directory
+        if: ${{ failure() }}
+        run: |
+          tar cJf build-${{ github.run_id }}.tar.xz --exclude ./build-${{ github.run_id }}.tar.xz .
+      - name: upload Artifact
+        if: ${{ failure() }}
+        uses: actions/upload-artifact@v3
+        with:
+          name: build-${{ github.run_id }}.tar.xz
+          path: build-${{ github.run_id }}.tar.xz
+          retention-days: 1