ghcup-metadata/.github/workflows/test-sigs.sh

28 lines
521 B
Bash
Raw Normal View History

2023-08-26 06:03:29 +00:00
#!/usr/bin/env bash
set -x
set -eo pipefail
. .github/workflows/common.sh
get_key() {
local key=$1
local server=$2
gpg --batch --keyserver "${server}" --recv-keys "${key}"
echo -e "${key}:6:" | gpg --import-ownertrust
}
# verify signature
2023-09-29 16:05:30 +00:00
. .github/workflows/sigs
2023-08-26 06:03:29 +00:00
for key in "${keys[@]}" ; do
get_key "${key}" keys.openpgp.org || get_key "${key}" keyserver.ubuntu.com
done
unset key
gpg --verify "${METADATA_FILE}.sig"
2023-11-12 07:50:36 +00:00
for f in ghcup-*.json ghcup-*.yaml hls-metadata-*.json ; do
gpg --verify "${f}.sig"
done