File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,13 +96,26 @@ jobs:
9696 # This prevents unnecessary builds if only one platform was modified
9797 - name : Determine if platform changed
9898 id : platform-filter
99- uses : dorny/paths-filter@v3
100- with :
101- filters : |
102- rocky8:
103- - 'images/docker/cbdb/build/rocky8/**'
104- rocky9:
105- - 'images/docker/cbdb/build/rocky9/**'
99+ run : |
100+ # Check Rocky 8 changes
101+ if git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -q "^images/docker/cbdb/build/rocky8/"; then
102+ echo "rocky8=true" >> $GITHUB_OUTPUT
103+ else
104+ echo "rocky8=false" >> $GITHUB_OUTPUT
105+ fi
106+
107+ # Check Rocky 9 changes
108+ if git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -q "^images/docker/cbdb/build/rocky9/"; then
109+ echo "rocky9=true" >> $GITHUB_OUTPUT
110+ else
111+ echo "rocky9=false" >> $GITHUB_OUTPUT
112+ fi
113+
114+ # For workflow_dispatch events, always return true
115+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
116+ echo "rocky8=true" >> $GITHUB_OUTPUT
117+ echo "rocky9=true" >> $GITHUB_OUTPUT
118+ fi
106119
107120 # Set up QEMU for multi-architecture support
108121 # This allows building ARM64 images on AMD64 infrastructure and vice versa
Original file line number Diff line number Diff 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/test/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/test/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
You can’t perform that action at this time.
0 commit comments