From 0a783839ee698cd7b85a42804a1a68082903a274 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Wed, 10 Jan 2024 16:14:19 +0100 Subject: [PATCH] Rework DEB build script and actions/upload steps. Signed-off-by: s3rj1k --- .github/workflows/ci-deb-packages-v2.yml | 59 ++++++++++++++++++------ 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-deb-packages-v2.yml b/.github/workflows/ci-deb-packages-v2.yml index 747ffe63..2a25dd2c 100644 --- a/.github/workflows/ci-deb-packages-v2.yml +++ b/.github/workflows/ci-deb-packages-v2.yml @@ -45,50 +45,79 @@ jobs: fetch-depth: 0 - name: General debs based on ${{ inputs.BASE_IMAGE }} for ${{ inputs.PLATFORM }} + shell: sh run: | - cat > run.sh <> $GITHUB_ENV + codename=$(echo ${{inputs.BASE_IMAGE}} | awk -F ':' '{print $2}') + echo "IMAGE_TAG=$codename-${{inputs.PLATFORM}}" >> $GITHUB_ENV - name: Copy git hash - run: echo $GITHUB_SHA > hash.txt shell: sh env: - GITHUB_SHA: ${{ github.sha }} + GITHUB_SHA: ${{ github.sha }} + run: | + echo $GITHUB_SHA > hash.txt - name: Compress files + shell: sh run: | - tar -czvf $image_tag.tar.gz $(ls | grep '.deb\|hash.txt') + tar -czvf ${{ env.IMAGE_TAG }}.tar.gz $(ls -1 | grep '.deb\|hash.txt') - name: Generate SHA checksum + shell: sh run: | - sha512sum $image_tag.tar.gz > $image_tag.sha1 + sha512sum ${{ env.IMAGE_TAG }}.tar.gz > ${{ env.IMAGE_TAG }}.sha1 - uses: actions/upload-artifact@v4 with: - name: deb-${{inputs.PLATFORM}}-artifact + name: deb-${{ env.IMAGE_TAG }}-artifact path: | *.tar.gz *.sha1 - + if-no-files-found: error + - uses: actions/upload-artifact@v4 with: - name: deb-changelog-artifact + name: deb-${{ env.IMAGE_TAG }}-changelog-artifact path: | ./debian/changelog + if-no-files-found: error