aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2023-12-16 13:40:22 +0100
committerGitHub <noreply@github.com>2023-12-16 13:40:22 +0100
commit1822ecd5f63b44246ea832eb5d25b545e06338e6 (patch)
tree88d14160984ef4b96dc9a5ce4647388ee7bb982b
parent10982789588017f36bbfaea13b76bdd02029e166 (diff)
downloadskyhanni-1822ecd5f63b44246ea832eb5d25b545e06338e6.tar.gz
skyhanni-1822ecd5f63b44246ea832eb5d25b545e06338e6.tar.bz2
skyhanni-1822ecd5f63b44246ea832eb5d25b545e06338e6.zip
Add check for new regexes before updating repo (#806)
Only updating repo if repo patterns got changed. #806
-rw-r--r--.github/workflows/generate-constants.yaml6
1 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/generate-constants.yaml b/.github/workflows/generate-constants.yaml
index 9df66081c..fccadc7fb 100644
--- a/.github/workflows/generate-constants.yaml
+++ b/.github/workflows/generate-constants.yaml
@@ -51,6 +51,12 @@ jobs:
- name: Commit generated regex
run: |
mkdir -p constants/
+ new_cmp="$(jq -S '.regexes' < constants.json)"
+ old_cmp="$(jq -S '.regexes' < constants/regexes.json)"
+ if [ "$new_cmp" = "$old_cmp" ]; then
+ echo Old and new are the same. We are in a never ending loop.
+ exit 0
+ fi
mv constants.json constants/regexes.json
git config user.name 'github-actions[bot]'
git config user.email 'github-action@users.noreply.github.com'