-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #550 from KoinuDayo/master
Add command to check wheater Upstream updated
- Loading branch information
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|