From d5eb6be04ade21a6033c705e9cb28ba69642f36d Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Tue, 19 Aug 2025 18:10:51 +0200 Subject: [PATCH] Update pull-request-verification.yml --- .../workflows/pull-request-verification.yml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/pull-request-verification.yml b/.github/workflows/pull-request-verification.yml index 0637433..2044d0d 100644 --- a/.github/workflows/pull-request-verification.yml +++ b/.github/workflows/pull-request-verification.yml @@ -165,3 +165,33 @@ jobs: || steps.filter.outputs.modified_files != 'LICENSE' || steps.filter.outputs.deleted_files != 'README.md' run: exit 1 + + test-list-files-json: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - run: | + echo "ONE" > one.txt + echo "TWO" > two.txt + git add one.txt two.txt + - uses: ./ + id: filter + with: + base: HEAD + list-files: json + filters: | + files: + - added|modified: '*.txt' + - name: filter-test + if: steps.filter.outputs.files != 'true' + run: exit 1 + - name: count-test + if: steps.filter.outputs.files_count != 2 + run: exit 1 + - name: json-test + env: + FILES: ${{ steps.filter.outputs.files_files }} + run: | + echo "$FILES" | jq -e 'sort == ["one.txt","two.txt"]'