File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Periodically check stuff for changes
2+
3+ on :
4+ schedule :
5+ - cron : " 33 3 12 * *"
6+ workflow_dispatch :
7+
8+ jobs :
9+ check-hash :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : compare hashes to stored values
13+ env :
14+ FILES : |-
15+ https://apt.armbian.com/armbian.key=45eea660732932370088652b214b85acb426c022529284211d76c12dcb5c9ec3
16+ run : |
17+ # for each line in FILES multi-line string, split into $URI and $HASH using
18+ # parameter expansion # and array expansion. then dl, checksum and compare.
19+ readarray -t lines <<< "$FILES"
20+ for line in "${lines[@]}"; do
21+ URI=${line%%=*}
22+ HASH=${line#*=}
23+ wget -qO- "$URI" | sha256sum | grep "$HASH" || exit 1
24+ echo verified $URI with hash $HASH successfully
25+ done
You can’t perform that action at this time.
0 commit comments