From 4e2db4ef678be633b0f3f0c7594998fd4458f225 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Wed, 28 Feb 2024 22:11:10 +0100 Subject: [PATCH] Upload DEB build logs. --- .github/workflows/ci-deb-packages-v2.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-deb-packages-v2.yml b/.github/workflows/ci-deb-packages-v2.yml index f81e5a5b..c63b83db 100644 --- a/.github/workflows/ci-deb-packages-v2.yml +++ b/.github/workflows/ci-deb-packages-v2.yml @@ -193,6 +193,11 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set custom variables + shell: sh + run: | + echo "IMAGE_TAG=${{ inputs.DISTRO_CODENAME }}-${{ inputs.PLATFORM }}" >> $GITHUB_ENV + - name: Build debs in Docker shell: sh env: @@ -206,18 +211,26 @@ jobs: -v $(pwd):/root \ -v /tmp/${GITHUB_RUN_ID}/run.sh:/usr/local/bin/run.sh:ro \ -e GENERIC_TOKEN="${GENERIC_TOKEN}" \ - ${{ inputs.BASE_IMAGE }}:${{ inputs.DISTRO_CODENAME }} + ${{ inputs.BASE_IMAGE }}:${{ inputs.DISTRO_CODENAME }} 2>&1 | \ + tee deb-${{ env.IMAGE_TAG }}-build.log - - name: Set custom variables - shell: sh - run: | - echo "IMAGE_TAG=${{ inputs.DISTRO_CODENAME }}-${{ inputs.PLATFORM }}" >> $GITHUB_ENV + - uses: actions/upload-artifact@v4 + with: + name: deb-${{ env.IMAGE_TAG }}-build-log-artifact + path: | + deb-*-build.log + if-no-files-found: warn - name: Copy git hash shell: sh env: GITHUB_SHA: ${{ github.sha }} run: | + if [ $(find . -maxdepth 1 -type f -name "*.deb" | wc -l) -eq 0 ]; then + echo "No .deb files were found in the current directory." + exit 1 + fi + echo $GITHUB_SHA > hash.txt - name: Compress files