From 78747466b8965b5f6dd9f2d8dd7381af254d7182 Mon Sep 17 00:00:00 2001 From: Vallari Agrawal Date: Thu, 10 Jul 2025 12:00:08 +0530 Subject: [PATCH] ci: run dev_container build for PRs Build the image for PRs but do not push. For pushes to main branch, push to registery. Signed-off-by: Vallari Agrawal --- .github/workflows/dev_container.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev_container.yml b/.github/workflows/dev_container.yml index f6c25de2f..850c69752 100644 --- a/.github/workflows/dev_container.yml +++ b/.github/workflows/dev_container.yml @@ -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 -- 2.47.3