Skip to content

Commit

Permalink
Merge pull request #550 from KoinuDayo/master
Browse files Browse the repository at this point in the history
Add command to check wheater Upstream updated
  • Loading branch information
NormanBB authored Aug 19, 2023
2 parents 7d69684 + d4c12ae commit e108fd9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/updategeoip-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,20 @@ jobs:
git fetch
cp ./BypassCNandLan.rules ./rules/BypassCNandLan.rules
git add ./rules/BypassCNandLan.rules
git commit -am "Updated at $(date)"
if ! git commit -am "Updated at $(date)"; then
curl -oL ./ https://github.com/FQrabbit/SSTap-Rule/raw/master/rules/BypassCNandLan.rules
hash1=$(sha256sum "./BypassCNandLan.rules" | awk '{print $1}')
hash2=$(sha256sum "./rules/BypassCNandLan.rules" | awk '{print $1}')
if [ "$hash1" == "$hash2" ]; then
echo "Hashes match. The files are identical."
echo "Upstream not updated"
else
echo "Hashes do not match. The files are different."
echo "ERROR! Upstream updated! There's something went WRONG!"
exit 1
fi
fi
- name: GitHub Push
uses: ad-m/[email protected]
Expand Down

0 comments on commit e108fd9

Please sign in to comment.