Automate blacklist updater / changes

This commit is contained in:
Be
2024-03-02 12:27:14 +01:00
parent 4d02ef738e
commit cf4dd0eb02

View File

@@ -47,8 +47,10 @@ jobs:
git config --global user.name "${{ env.REPO_OWNER }}"
git config --global user.email "${{ env.REPO_OWNER }}@github.com"
git add blacklist*txt
git diff --staged --exit-code || echo "No changes to commit"
if [ $? -ne 0 ]; then
git diff --staged --quiet || CHANGED=true
if [ "$CHANGED" = true ]; then
git commit -m "Update $timestamp"
git push https://${{ env.GH_PAT }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}.git
else
echo "No changes to commit"
fi