From f154d32b3f19cbef35b3da295c107b2f3fcb9200 Mon Sep 17 00:00:00 2001 From: elhmn Date: Sun, 10 Nov 2024 10:52:50 +0100 Subject: [PATCH] Fix the hash storage --- .github/workflows/report_news.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/report_news.yaml b/.github/workflows/report_news.yaml index e47e1da..77131a9 100644 --- a/.github/workflows/report_news.yaml +++ b/.github/workflows/report_news.yaml @@ -40,8 +40,8 @@ jobs: run: | # Count the number of lines from the hash file, if it's greater than 100 # We remove the top 10 lines hashes from the file - [[ $(cat $REPORT_HASH_FILE | wc -l) > 1000 ]] &&\ - tail -n +990 $REPORT_HASH_FILE > $REPORT_HASH_FILE + [[ $(cat $REPORT_HASH_FILE | wc -l) -gt 1000 ]] && \ + tail -n 990 $REPORT_HASH_FILE > tmp.hash && mv tmp.hash $REPORT_HASH_FILE - name: Commit list of the articles we have already shared shell: bash