From f2b1a9bcf9020e5be162d66b046c6889269ea16d Mon Sep 17 00:00:00 2001 From: Alexis Romero Date: Thu, 3 Aug 2023 10:10:46 +0200 Subject: [PATCH] GH actions. build-packages.yml: adding a hash verification for all targets --- .github/workflows/build-packages.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 63fe7e1256..12bedec6cb 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -136,6 +136,18 @@ jobs: echo "$HOSTKEY" > ~/.ssh/known_hosts rsync -4rlptD built_pkgs/* "$RSYNCTARGET" + check-hashes: + needs: build + name: Check if hashes were created for all requested targets + runs-on: ubuntu-20.04 + steps: + - name: Get list of outputs from build jobs + run: echo '${{ toJSON(needs.build.outputs) }}' | jq 'keys[]' | grep -v version | tee /tmp/build-outputs.txt + - name: Get list of OS inputs + run: for i in ${{ inputs.os }}; do echo "\"pkghashes-$i\""; done | sort | tee /tmp/os-inputs.txt; echo "\"srchashes\"" | tee -a /tmp/os-inputs.txt + - name: Fail if there is a hash missing + run: if ! diff -q /tmp/build-outputs.txt /tmp/os-inputs.txt; then exit 1; fi + provenance-pkgs: needs: [prepare, build] name: Generate provenance for ${{ inputs.product }} (${{ inputs.ref }}) for ${{ matrix.os }} -- 2.47.2