@@ -21,6 +21,10 @@ inputs:
21
21
exclude-projects :
22
22
description : " The projects to exclude when full upload should happen"
23
23
required : false
24
+ projectsFolder :
25
+ description : " The folder where the projects are located"
26
+ required : false
27
+ default : " packages"
24
28
25
29
runs :
26
30
using : " composite"
@@ -61,15 +65,15 @@ runs:
61
65
if : " inputs.use-affected == 'true'"
62
66
shell : " bash"
63
67
run : |
64
- IFS=$'\n' read -r -d '' -a affected_projects < <(pnpm nx show projects --affected --files=${{ inputs.affected-files }} --exclude=${{ inputs.exclude-affected-projects }} && printf '\0')
68
+ IFS=$'\n' read -r -d '' -a affected_projects < <(pnpm nx show projects --affected --projects "${{ inputs.projectsFolder }}/*" -- files=${{ inputs.affected-files }} --exclude=${{ inputs.exclude-affected-projects }} && printf '\0')
65
69
66
70
# Remove the first two elements of the array, this include infos about the command call
67
71
unset 'affected_projects[0]'
68
72
unset 'affected_projects[1]'
69
73
70
74
for project in "${affected_projects[@]}"; do
71
75
echo "Runing codecov in ${project} folder"
72
- ./codecov --codecov-yml-path codecov.yml --verbose upload-process --fail-on-error --dir "packages /${project}" -t "${CODECOV_TOKEN}" -F "${project}" -n "${project}-${{ github.run_id }}"
76
+ ./codecov --codecov-yml-path codecov.yml --verbose upload-process --fail-on-error --dir "${{ inputs.projectsFolder }} /${project}" -t "${CODECOV_TOKEN}" -F "${project}" -n "${project}-${{ github.run_id }}"
73
77
done
74
78
env :
75
79
CODECOV_TOKEN : " ${{ inputs.codecov-token }}"
@@ -78,15 +82,15 @@ runs:
78
82
if : " inputs.use-affected == 'false'"
79
83
shell : " bash"
80
84
run : |
81
- IFS=$'\n' read -r -d '' -a exclude_array < <(pnpm nx show projects --exclude=${{ inputs.exclude-projects }} && printf '\0')
85
+ IFS=$'\n' read -r -d '' -a exclude_array < <(pnpm nx show projects --projects "${{ inputs.projectsFolder }}/*" -- exclude=${{ inputs.exclude-projects }} && printf '\0')
82
86
83
87
# Remove the first two elements of the array, this include infos about the command call
84
88
unset 'exclude_array[0]'
85
89
unset 'exclude_array[1]'
86
90
87
91
for project in "${exclude_array[@]}"; do
88
92
echo "Runing codecov in ${project} folder"
89
- ./codecov --codecov-yml-path codecov.yml --verbose upload-process --fail-on-error --dir "packages /${project}" -t "${CODECOV_TOKEN}" -F "${project}" -n "${project}-${{ github.run_id }}"
93
+ ./codecov --codecov-yml-path codecov.yml --verbose upload-process --fail-on-error --dir "${{ inputs.projectsFolder }} /${project}" -t "${CODECOV_TOKEN}" -F "${project}" -n "${project}-${{ github.run_id }}"
90
94
done
91
95
env :
92
96
CODECOV_TOKEN : " ${{ inputs.codecov-token }}"
0 commit comments