From cfb1938b43b2f69c165d5f0d4d8365b0393a8e4b Mon Sep 17 00:00:00 2001 From: Shubharanshu Mahapatra Date: Wed, 11 Dec 2024 22:34:08 +0530 Subject: [PATCH] feat: Add workflow to update windows hash and filename Signed-off-by: Shubharanshu Mahapatra --- .github/workflows/rootfs.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rootfs.yaml b/.github/workflows/rootfs.yaml index b0d60c1..f232332 100644 --- a/.github/workflows/rootfs.yaml +++ b/.github/workflows/rootfs.yaml @@ -65,12 +65,33 @@ jobs: compressed_archive=finch-rootfs-production-${{ matrix.arch }}-"$TIMESTAMP".tar.gz gzip -9 -c finch-rootfs-production-${{ matrix.arch }}.tar > $compressed_archive - sha512sum $compressed_archive | cut -d " " -f 1 > $compressed_archive.sha512sum + sha512_digest=$(sha512sum $compressed_archive | cut -d " " -f 1) + echo $sha512_digest > $compressed_archive.sha512sum ARCHPATH="x86-64" + ARTIFACT_KEY="X86_64" if [ ${{ matrix.arch }} == "arm64" ]; then ARCHPATH="aarch64" + ARTIFACT_KEY="ARM64" fi # Upload tarball and shasum to S3 aws s3 cp . s3://${{ secrets.DEPENDENCY_BUCKET_NAME }}/${{ matrix.platform }}/$ARCHPATH/ --recursive --exclude "*" --include "finch-rootfs-production-${{ matrix.arch }}-"$TIMESTAMP".tar.gz*" + + cat < deps/rootfs.conf + ARTIFACT_BASE_URL=https://deps.runfinch.com + + ${ARTIFACT_KEY}_ARTIFACT_PATHING=common/$ARCHPATH + ${ARTIFACT_KEY}_ARTIFACT=$compressed_archive + ${ARTIFACT_KEY}_512_DIGEST=$sha512_digest + EOL + + - name: create pr + uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + signoff: true + title: 'build(deps): Update windows rootfs' + add-paths: deps/rootfs.conf + body: | + Update the rootfs for the windows platform. \ No newline at end of file