Skip to content

Commit 90cb2b4

Browse files
committed
Use shell to detect file changes in build dir
Replace dorny/paths-filter action with a custom shell script to determine if there are changes in the following dirs: * 'images/docker/cbdb/build/rocky8/' * 'images/docker/cbdb/build/rocky9/' See: apache#20
1 parent e06dd83 commit 90cb2b4

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

.github/workflows/docker-cbdb-test-containers.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,26 @@ jobs:
8080
# Determine if the current platform's files have changed
8181
- name: Determine if platform changed
8282
id: platform-filter
83-
uses: dorny/paths-filter@v3
84-
with:
85-
filters: |
86-
rocky8:
87-
- 'images/docker/cbdb/test/rocky8/**'
88-
rocky9:
89-
- 'images/docker/cbdb/test/rocky9/**'
83+
run: |
84+
# Check Rocky 8 changes
85+
if git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -q "^images/docker/cbdb/build/rocky8/"; then
86+
echo "rocky8=true" >> $GITHUB_OUTPUT
87+
else
88+
echo "rocky8=false" >> $GITHUB_OUTPUT
89+
fi
90+
91+
# Check Rocky 9 changes
92+
if git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -q "^images/docker/cbdb/build/rocky9/"; then
93+
echo "rocky9=true" >> $GITHUB_OUTPUT
94+
else
95+
echo "rocky9=false" >> $GITHUB_OUTPUT
96+
fi
97+
98+
# For workflow_dispatch events, always return true
99+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
100+
echo "rocky8=true" >> $GITHUB_OUTPUT
101+
echo "rocky9=true" >> $GITHUB_OUTPUT
102+
fi
90103
91104
# Skip if no changes for current platform
92105
- name: Skip if not relevant

0 commit comments

Comments
 (0)