File tree 2 files changed +15
-12
lines changed
2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 43
43
id : generate-matrix
44
44
run : |
45
45
bash cicd-deployment-scripts/pi/matrix.sh \
46
- -p "${{ github.event.pull_request.number }}" \
46
+ -p "${{ github.event.pull_request.number || '' }}" \
47
47
-s cicd-deployment-scripts/pi/settings.sh \
48
48
-t "${{ inputs.parent_image_type }}"
Original file line number Diff line number Diff line change 17
17
18
18
source $SOURCE_SCRIPT
19
19
20
- UPDATED_FILES=$( gh pr diff $PR_NUMBER --name-only)
21
20
UPDATED_PARENT_TYPES=()
22
- while IFS= read -r file; do
23
- if [[ $file != requirements/* ]] || [[ $file != * .in ]]; then
24
- continue
25
- fi
26
-
27
- parent_image_type=$( basename $file | sed ' s|-requirements.in||g' )
28
- UPDATED_PARENT_TYPES+=($parent_image_type )
29
21
30
- done <<< " $UPDATED_FILES"
31
-
32
- if [ -n $PARENT_IMAGE_TYPE ]; then
22
+ if [ -n $PR_NUMBER ] && [ -z $PARENT_IMAGE_TYPE ]; then
23
+ UPDATED_FILES=$( gh pr diff $PR_NUMBER --name-only)
24
+ while IFS= read -r file; do
25
+ if [[ $file != requirements/* ]] || [[ $file != * .in ]]; then
26
+ continue
27
+ fi
28
+
29
+ parent_image_type=$( basename $file | sed ' s|-requirements.in||g' )
30
+ UPDATED_PARENT_TYPES+=($parent_image_type )
31
+
32
+ done <<< " $UPDATED_FILES"
33
+ echo " ::notice::Exporting matrix for parent image types: $UPDATED_PARENT_TYPES "
34
+ elif [ -z $PR_NUMBER ] && [ -n $PARENT_IMAGE_TYPE ]; then
35
+ echo " ::notice::Exporting matrix for parent image type: $PARENT_IMAGE_TYPE "
33
36
UPDATED_PARENT_TYPES=( $PARENT_IMAGE_TYPE )
34
37
fi
35
38
You can’t perform that action at this time.
0 commit comments