8000 Fix GitHub workflows and formatter script (#9) · TheAlgorithms/scripts@9750198 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9750198

Browse files
authored
Fix GitHub workflows and formatter script (#9)
1 parent 6a466a2 commit 9750198

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/formatter-ignore-files.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test with ignore directory argument
2-
on: workflow_dispatch
2+
on:
3+
push:
4+
branches:
5+
- 'main'
36
jobs:
47
formatter:
58
runs-on: ubuntu-latest

directory_md/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ runs:
3030
- name: Running the formatter
3131
shell: bash
3232
run: |
33-
python ./build_directory_md.py ${{ inputs.language }} ${{ inputs.working-directory }} ${{ inputs.filetypes }} ${{ inputs.ignored-directories }} ${{ inputs.ignore-folders-children }} > DIRECTORY.md
33+
python ../build_directory_md.py ${{ inputs.language }} ${{ inputs.working-directory }} ${{ inputs.filetypes }} ${{ inputs.ignored-directories }} ${{ inputs.ignore-folders-children }} > DIRECTORY.md

filename_formatter.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ str_value2="$2"
2323
fi
2424

2525
IFS=$'\n'; set -f
26-
for fname in $(find $1 -type f -name "*$str_value2" -or -name "*$str_value")
26+
for fname in `find $1 -type f -name "$str_value2" -o -name "$str_value"`
2727
do
2828
ignored_files="$(echo "$3" | tr "," "\n")"
2929

formatter/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ runs:
2020
- name: Running the formatter
2121
shell: bash
2222
run: |
23-
filename_formatter.sh ${{ inputs.working-directory }} ${{ inputs.filetypes }} ${{ inputs.ignore-files }}
23+
../filename_formatter.sh ${{ inputs.working-directory }} ${{ inputs.filetypes }} ${{ inputs.ignore-files }}

0 commit comments

Comments
 (0)
0