File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments