diff --git a/.github/workflows/hashes.yaml b/.github/workflows/hashes.yaml index f87c0e6440..2f8b713a7a 100644 --- a/.github/workflows/hashes.yaml +++ b/.github/workflows/hashes.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - name: Install dependencies run: | - sudo apt-get install -y --no-install-recommends curl gpg jq python3-pip + sudo apt-get install -y --no-install-recommends curl gpg jq python3-pip zbar-tools sudo pip3 install yq - name: Verify hashes.txt + contributing.yml signature run: | @@ -32,11 +32,31 @@ jobs: - name: Verify General Fund donation QR's run: | yaml="_data/contributing.yml" - for type in xmr btc; do - checksum=$(awk "/qr_${type}_checksum:/ {print \$2}" "$yaml") - file=$(awk "/qr_${type}_filename:/ {print \$2}" "$yaml") - echo "DEBUG: $checksum $file" - echo "$checksum $file" | sha256sum -c + get_yaml_value() { + awk -v key="$1:" '$1 == key {print $2}' "$yaml" + } + for coin in xmr btc; do + qr_checksum=$(get_yaml_value "qr_${coin}_checksum") + qr_filename=$(get_yaml_value "qr_${coin}_filename") + qr_content=$(get_yaml_value "qr_${coin}_content") + echo "DEBUG: $qr_checksum $qr_filename" + echo "DEBUG: $qr_content" + # Confirm hashes match + echo "$qr_checksum $file" | sha256sum -c + + # Get QR content + qr_scanned=$(zbarimg -q --raw "$qr_filename") + + # Compare scanned content with expected content + if [ "$qr_scanned" = "$qr_content" ]; then + echo "${coin^^} QR code content matches exactly" + else + echo "${coin^^} QR code content does not match" + echo "Scanned: $qr_scanned" + echo "Expected: $qr_content" + fi + echo "---" + done - name: Verify filenames run: | diff --git a/_data/contributing.yml b/_data/contributing.yml index 2fe1aaa19a..719b3901a9 100644 --- a/_data/contributing.yml +++ b/_data/contributing.yml @@ -4,6 +4,8 @@ address_openalias: donate.getmonero.org view_address: 44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A view_key: f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501 qr_xmr_filename: img/donate-monero.png +qr_xmr_content: 888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H qr_xmr_checksum: cf6cb49cf98726a40b860a6bb19df77df724a3e8e1ccb039adf8432de1509911 qr_btc_filename: img/donate-bitcoin.png -qr_btc_checksum: ef2b0e59e401caad2393cb11f50dfc29b364e0af0fd5683012fe0abded608655 +qr_btc_content: bitcoin:1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H +qr_btc_checksum: f805c5601a169185be14e0e9f9bf49a75805cff294581ecb30a4f494f4fe38c4 diff --git a/_data/contributing.yml.asc b/_data/contributing.yml.asc index e99381a4b1..135e708e3c 100644 --- a/_data/contributing.yml.asc +++ b/_data/contributing.yml.asc @@ -1,7 +1,7 @@ -----BEGIN PGP SIGNATURE----- -iI0EABMIADUWIQTci88MUIPyAweCgD5OipEtQO0FLAUCZw/b9xcccGxvd3NvZkBw -cm90b25tYWlsLmNvbQAKCRBOipEtQO0FLLGXAPoC2QGUbBPozZYqbzoJ/dsx+Kr+ -4JKe1roJvhgeUJdzMgD/VFJYuetujmhfWvfxjJMBHPMMBdOAmI/iTtMjsITVb5s= -=ptoN +iI0EABMIADUWIQTci88MUIPyAweCgD5OipEtQO0FLAUCZxC+axcccGxvd3NvZkBw +cm90b25tYWlsLmNvbQAKCRBOipEtQO0FLDIjAP9sFRE2OBVeeHFv44yHpn+FDXVr +UPaqcy356El6dv8iWwD/dHQAA8cR9D1Sr+zOS8aeJgEpl+Ce+a9dYHRYpFmdlgk= +=B7Wp -----END PGP SIGNATURE----- diff --git a/img/donate-bitcoin.png b/img/donate-bitcoin.png index 6fbfeea072..33c9cccea6 100644 Binary files a/img/donate-bitcoin.png and b/img/donate-bitcoin.png differ