File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 6161      - ' devops/deploy/docker/build/rocky8/**' 
6262      - ' devops/deploy/docker/build/rocky9/**' 
6363      - ' devops/deploy/docker/build/ubuntu22.04/**' 
64+   pull_request :
65+     paths :
66+       - ' devops/deploy/docker/build/**' 
6467  workflow_dispatch :  #  Manual trigger
6568
6669#  Prevent multiple workflow runs from interfering with each other
@@ -116,7 +119,7 @@ jobs:
116119      #  Login to DockerHub for pushing images
117120      #  Requires DOCKERHUB_USER and DOCKERHUB_TOKEN secrets to be set
118121      - name : Login to Docker Hub 
119-         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' }} 
122+         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'  }} 
120123        uses : docker/login-action@v3 
121124        with :
122125          username : ${{ secrets.DOCKERHUB_USER }} 
@@ -165,7 +168,7 @@ jobs:
165168#  Build and push multi-architecture images
166169      #  This creates a manifest list that supports both architectures
167170      - name : Build and Push Multi-arch Docker images 
168-         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' }} 
171+         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'  }} 
169172        uses : docker/build-push-action@v6 
170173        with :
171174          context : ./devops/deploy/docker/build/${{ matrix.platform }} 
Original file line number Diff line number Diff line change 5050      - ' devops/deploy/docker/test/rocky8/**' 
5151      - ' devops/deploy/docker/test/rocky9/**' 
5252      - ' devops/deploy/docker/test/ubuntu22.04/**' 
53+   pull_request :
54+     paths :
55+       - ' devops/deploy/docker/test/**' 
5356  workflow_dispatch :  #  Manual trigger
5457
5558#  Prevent multiple workflow runs from interfering with each other
@@ -104,7 +107,7 @@ jobs:
104107
105108      #  Login to DockerHub for pushing images
106109      - name : Login to Docker Hub 
107-         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' }} 
110+         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'  }} 
108111        uses : docker/login-action@v3 
109112        with :
110113          username : ${{ secrets.DOCKERHUB_USER }} 
@@ -135,7 +138,7 @@ jobs:
135138#  Build and push multi-architecture images
136139      #  Creates a manifest list that supports both architectures
137140      - name : Build and Push Multi-arch Docker images 
138-         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' }} 
141+         if : ${{ steps.platform-filter.outputs[matrix.platform] == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'  }} 
139142        uses : docker/build-push-action@v6 
140143        with :
141144          context : ./devops/deploy/docker/test/${{ matrix.platform }} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments