From 035fcd70295b6fb72b26d4d2adc0413ee053ac1e Mon Sep 17 00:00:00 2001 From: Darren Worrall Date: Fri, 9 Feb 2024 11:54:21 +0000 Subject: [PATCH] Combined checksum --- .github/workflows/build-deb.sh | 9 ++------- .github/workflows/tests.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-deb.sh b/.github/workflows/build-deb.sh index 6baa68e1..577ffb26 100755 --- a/.github/workflows/build-deb.sh +++ b/.github/workflows/build-deb.sh @@ -6,8 +6,8 @@ sudo apt-get update sudo apt-get install -y make # We set this here, so it's the same between the copydb and sharding debian -# package. -DATETIME=$(date -u +%Y%m%d%H%M%S) +# package, and between different arch builds +DATETIME=$(date -u +%Y%m%d) git status @@ -15,16 +15,11 @@ make copydb-deb DATETIME=${DATETIME} make sharding-deb DATETIME=${DATETIME} cd build -sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum - set +x echo "Debian package built successfully as follows:" ls -l ghostferry* -echo "sha256sum:" -cat ghostferry-$GITHUB_SHA.sha256sum - # Make sure the we didn't release a dirty build by accident if ls | grep -q dirty; then echo "ERROR: source directory is not clean! refused to release. showing git status below:" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 71a81477..077181d8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,3 +93,21 @@ jobs: with: name: debs path: build/ghostferry* + + checksum-debs: + runs-on: ubuntu-latest + needs: build-debs + steps: + - name: Fetch uploaded artifacts + uses: actions/download-artifact@v4 + with: + name: debs + - name: shasum + shell: bash + run: | + sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum + - name: Upload checksum + uses: actions/upload-artifact@v3 + with: + name: debs + path: *.sha256sum