Skip to content

Commit 2e64d0f

Browse files
committed
fix: fix for changed files
Signed-off-by: Alan Clucas <alan@clucas.org>
1 parent 27ece58 commit 2e64d0f

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,25 @@ jobs:
3939
with:
4040
fetch-depth: 50
4141

42-
- name: Ensure ./.features/*.md addition(s)
42+
- name: Ensure ./.features/pending/*.md addition(s)
43+
id: changed-files
44+
uses: tj-actions/changed-files@cbda684547adc8c052d50711417fa61b428a9f88 # v41.1.2
45+
with:
46+
files: |
47+
.features/pending/*.md
48+
49+
- name: No ./.features/*.md addition
50+
if: steps.changed-files.outputs.any_added == false
4351
run: |
44-
if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/${{ github.base_ref }} $PR_HEAD) $PR_HEAD ./.features | grep -c \\.md) ]]
45-
then
46-
echo "No feature description was added to the ./.features/ directory for this feature PR."
47-
echo "Please add a .md file to the ./.features/ directory."
48-
echo "See docs/running-locally.md for more details."
49-
false
50-
else
51-
echo "A feature description was added to the ./.features/ directory."
52-
fi
52+
echo "No feature description was added to the ./.features/ directory for this feature PR."
53+
echo "Please add a .md file to the ./.features/ directory."
54+
echo "See docs/running-locally.md for more details."
55+
false
5356
5457
- name: Validate ./.features/*.md changes
58+
if: steps.changed-files.outputs.any_added
5559
run: |
60+
echo "A feature description was added to the ./.features/ directory."
5661
make features-validate \
5762
|| { echo "New ./.features/*.md file failed validation."; exit 1; }
5863

0 commit comments

Comments
 (0)