From e3079db4080d89fd9b7e6e36b70568d41eea2a9b Mon Sep 17 00:00:00 2001 From: Nabeen Tiwaree Date: Tue, 13 Jun 2023 21:25:53 +0545 Subject: [PATCH] fix: checksum --- .github/workflows/build.yaml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fb13014..00aad21 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,5 @@ # GHW workflow to build metislinux iso -name: build metis iso per release +name: Build Metis Linux ISO per Release on: push: @@ -7,6 +7,7 @@ env: api_key: ${{ secrets.GITHUB_TOKEN }} name: ${{ github.event.repository.name }} release_name: ${{ github.ref_name }} + jobs: build: runs-on: ubuntu-latest @@ -16,9 +17,10 @@ jobs: options: --privileged steps: - # - name: Cloning the repository! please wait... - - uses: actions/checkout@v3 - - name: Installing artools in the system + - name: Cloning the repository + uses: actions/checkout@v3 + + - name: Installing artools and dependencies run: | pacman --noconfirm -Sy ruby artools iso-profiles man-pages man @@ -35,36 +37,38 @@ jobs: mkdir ~/artools-workspace/iso-profiles -p cp base ~/artools-workspace/iso-profiles -r mkdir ~/.config/artools -p - cp config/pacman.conf /usr/share/artools/pacman.conf.d/default.conf cp -r config/me* /etc/pacman.d/ - ./build-iso.sh - #buildiso -q -i runit - #buildiso -p base -i runit -t iso echo "NOW=$(date +'%Y%m%d')" >> $GITHUB_ENV - name: Find ISO path and name + id: find_iso run: | ISO_PATH=$(find ~/artools-workspace/iso -name "artix-base-runit-${{ env.NOW }}-x86_64.iso" | head -n 1) echo "ISO_PATH=$ISO_PATH" >> $GITHUB_ENV + echo "::set-output name=iso_path::$ISO_PATH" - name: Generate SHA256 checksum + id: generate_checksum run: | - CHECKSUM=$(sha256sum "${ISO_PATH}" | awk '{print $1}') + CHECKSUM=$(sha256sum "${{ steps.find_iso.outputs.iso_path }}" | awk '{print $1}') echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV + echo "::set-output name=checksum::$CHECKSUM" - name: Uploading image and checksum to releases uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - files: | - ${{ env.ISO_PATH }} - <(echo "${CHECKSUM} ${ISO_PATH}" > checksum.txt) - asset_names: | - metis-linux-runit-${{ env.NOW }}-x86_64.iso - metis-linux-runit-${{ env.NOW }}-x86_64.iso.sha256 + file: ${{ steps.find_iso.outputs.iso_path }} + asset_name: metis-linux-runit-${{ env.NOW }}-x86_64.iso tag: MetisLinux-${{ env.NOW }} overwrite: true body: This is the release of Metis Linux ISO on ${{ env.NOW }} + asset_content_type: application/octet-stream + - name: Uploading checksum file + uses: actions/upload-artifact@v2 + with: + name: metis-linux-runit-${{ env.NOW }}-x86_64.iso.sha256 + path: checksum.txt