get-static-cache-key.sh 658 B

1234567891011121314151617
  1. #!/bin/sh
  2. arch="${1}"
  3. platform="$(packaging/makeself/uname2platform.sh "${arch}")"
  4. builder_rev="v1"
  5. docker pull --platform "${platform}" netdata/static-builder:${builder_rev}
  6. # shellcheck disable=SC2046
  7. cat $(find packaging/makeself/jobs -type f ! -regex '.*\(netdata\|-makeself\).*') > /tmp/static-cache-key-data
  8. cat packaging/makeself/bundled-packages.version >> /tmp/static-cache-key-data
  9. docker run -it --rm --platform "${platform}" netdata/static-builder:${builder_rev} sh -c 'apk list -I 2>/dev/null' >> /tmp/static-cache-key-data
  10. h="$(sha256sum /tmp/static-cache-key-data | cut -f 1 -d ' ')"
  11. echo "key=static-${arch}-${h}" >> "${GITHUB_OUTPUT}"