Skip to content

Commit 0b95e49

Browse files
committed
chore: update workflow skip action
Signed-off-by: Frank Kong <frkong@redhat.com>
1 parent e23f7e1 commit 0b95e49

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/actions/should-skip-build/action.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ inputs:
1515
required: false
1616
default: 'true'
1717
file-patterns:
18-
description: 'File extensions to check for skip logic (space or comma-separated, e.g., ".md")'
18+
description: 'Regex patterns to match files for skip logic (space, comma, or newline-separated)'
1919
required: false
20-
default: '.md'
20+
default: '\.md$'
2121
outputs:
2222
should_skip:
2323
description: 'Whether the build should be skipped (true/false)'
@@ -145,9 +145,9 @@ runs:
145145
echo "$CHANGED_FILES"
146146
echo ""
147147
148-
# Parse file patterns (handle both space and comma-separated)
148+
# Parse file patterns (handle space, comma, and newline-separated)
149149
FILE_PATTERNS="${{ inputs.file-patterns }}"
150-
FILE_PATTERNS=$(echo "$FILE_PATTERNS" | tr ',' ' ')
150+
FILE_PATTERNS=$(echo "$FILE_PATTERNS" | tr ',\n' ' ')
151151
152152
echo "Checking for file patterns: $FILE_PATTERNS"
153153
echo ""
@@ -164,7 +164,7 @@ runs:
164164
# Check if file matches any of the patterns
165165
FILE_MATCHES="false"
166166
for pattern in $FILE_PATTERNS; do
167-
if [[ "$file" =~ ${pattern}$ ]]; then
167+
if [[ "$file" =~ ${pattern} ]]; then
168168
FILE_MATCHES="true"
169169
break
170170
fi

.github/workflows/build-container.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
image: ${{ env.REGISTRY_IMAGE }}
4343
commit-sha: ${{ github.sha }}
4444
check-image: 'true'
45-
file-patterns: '.md'
45+
file-patterns: |
46+
^.*\.md$
47+
^renovate\.json$
4648
- name: Install skopeo
4749
if: steps.skip_check.outputs.should_skip != 'true'
4850
run: |

.github/workflows/test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
with:
2727
commit-sha: ${{ github.sha }}
2828
check-image: 'false'
29-
file-patterns: '.md'
29+
file-patterns: |
30+
^.*\.md$
31+
^renovate\.json$
3032
3133
- name: Set up Python
3234
if: steps.skip_check.outputs.should_skip != 'true'

0 commit comments

Comments
 (0)