From e3129f075ccb93165e314e8753f615230dd0ef46 Mon Sep 17 00:00:00 2001
From: Philipp Stadler <hello@phstadler.com>
Date: Thu, 18 Jul 2024 14:19:11 +0200
Subject: [PATCH] fix: use curl with --fail to detect non-2xx

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bcc20c8..f071708 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,7 +12,7 @@ build:
     - if: $CI_PIPELINE_SOURCE == "merge_request_event"
     - if: $CI_COMMIT_TAG
   script:
-    - curl https://gitlab.phaidra.org/kartenaale/card-templates/-/jobs/104428/artifacts/raw/card-templates-1.0.2.tar.gz | tar -xz
+    - curl --fail https://gitlab.phaidra.org/kartenaale/card-templates/-/jobs/104428/artifacts/raw/card-templates-1.0.2.tar.gz | tar -xz
     - export_apkgs -c content -t templates -o .
     - echo "ARTIFACTS_URL=https://gitlab.phaidra.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/browse" > build.env
   artifacts:
@@ -34,7 +34,7 @@ fetch-configs:
   # we don't need anything in node_modules or python, so don't fetch the cache
   cache: []
   script:
-    - 'curl -H "PRIVATE-TOKEN: $COMMON_CI_API_TOKEN" "https://gitlab.phaidra.org/api/v4/projects/1469/repository/files/cliff.toml/raw/?ref=main" > cliff.toml'
+    - 'curl --fail -H "PRIVATE-TOKEN: $COMMON_CI_API_TOKEN" "https://gitlab.phaidra.org/api/v4/projects/1469/repository/files/cliff.toml/raw/?ref=main" > cliff.toml'
   artifacts:
     paths:
       - cliff.toml
-- 
GitLab