]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
ci: run dev_container build for PRs 2064/head
authorVallari Agrawal <val.agl002@gmail.com>
Thu, 10 Jul 2025 06:30:08 +0000 (12:00 +0530)
committerVallari Agrawal <val.agl002@gmail.com>
Fri, 11 Jul 2025 16:42:40 +0000 (22:12 +0530)
Build the image for PRs but do not push.
For pushes to main branch, push to registery.

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
.github/workflows/dev_container.yml

index f6c25de2f685cafd8bd9a3d41f76903232b876cb..850c69752648a1dc0649d6164d56649834cd55ff 100644 (file)
@@ -2,6 +2,9 @@
 name: dev_container
 on:
   push:
+    branches:
+      - 'main'
+  pull_request:
     branches:
       - main
   workflow_dispatch:
@@ -17,6 +20,7 @@ jobs:
       - name: Set up Docker Buildx
         uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
       - name: Login to Quay.io
+        if: github.event_name == 'push' && github.ref_name == 'main'
         uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
         with:
           registry: quay.io
@@ -31,6 +35,6 @@ jobs:
           context: .
           file: containers/teuthology-dev/Dockerfile
           platforms: linux/amd64,linux/arm64
-          push: true
+          push: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
           tags: ${{ env.QUAY_URI }}:${{ env.QUAY_TAG }}
           outputs: type=image,name=target