From 6e2650a147127092f7eb17bfdc646bb789ab08db Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 4 Dec 2023 04:22:28 -0500 Subject: [PATCH] [CI] Drop 4XX status refcache entries, fail GH action when found (#3640) --- .github/workflows/check-links.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 2f6630a2bb2c..0bccf03f0415 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -49,7 +49,14 @@ jobs: - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: { name: build-log-etc } - - run: npm run diff:fail + - name: Fail when refcache contains entries with HTTP status 4XX + run: | + if grep -B 1 -e '"StatusCode": 4' static/refcache.json; then + echo "Run 'npx gulp prune' to remove 4xx entries from the refcache" + exit 1 + fi + - name: Does the refcache need updating? + run: npm run diff:fail check-build-log-for-issues: name: WARNINGS in build log?