vishesh92 commented on code in PR #81:
URL: 
https://github.com/apache/cloudstack-kubernetes-provider/pull/81#discussion_r2559854070


##########
.github/workflows/build-docker-image.yml:
##########
@@ -57,8 +50,41 @@ jobs:
       - name: Set Docker image FULL TAG
         run: echo "FULL_TAG=$(if [ "${{ secrets.DOCKER_REGISTRY }}" = "" 
];then echo ${DOCKER_REPOSITORY}/cloudstack-kubernetes-provider:${TAG};else 
echo ${{ secrets.DOCKER_REGISTRY 
}}/${DOCKER_REPOSITORY}/cloudstack-kubernetes-provider:${TAG};fi)" >> 
$GITHUB_ENV
 
-      - name: Build the Docker image for cloudstack-kubernetes-provider
-        run: docker build . --file Dockerfile --tag ${FULL_TAG}
+      - name: Check if should push
+        id: should_push
+        run: |
+          if [ "${{ github.event_name }}" != "pull_request" ] || [ "${{ 
github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" 
]; then
+            echo "should_push=true" >> $GITHUB_OUTPUT
+          else
+            echo "should_push=false" >> $GITHUB_OUTPUT
+          fi

Review Comment:
   Yes. That's correct.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to