From 99168d28eacc30b168aae23de283775aeb3215c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Sun, 17 Nov 2024 21:52:51 +0100 Subject: [PATCH] Don't edit `slugs.md` in pull requests (#12148) --- .github/workflows/verify.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 30b7ff492..c46e597df 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -42,11 +42,23 @@ jobs: list-files: shell filters: | docs: - - '*.md' + - '*!(slugs).md' - '.github/**.md' icons: - 'icons/*.svg' + slugs: + - 'slugs.md' token: ${{ secrets.GITHUB_TOKEN }} + - name: Don't edit slugs.md in pull requests + if: | + github.base_ref != 'refs/heads/master' && + github.event_name == 'pull_request' && + steps.changes.outputs.slugs == 'true' + run: | + echo -ne "Detected slugs.md file edition in PR.\n" 1>&2 + echo -ne "Please revert it, we build the slugs.md" 1>&2 + echo -ne " file automatically at releases.\n" 1>&2 + exit 1 - name: Install dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Run linter