From c25f204442e15781ad9119498c3b56a238ede634 Mon Sep 17 00:00:00 2001 From: Alexander Didenko Date: Thu, 20 Jun 2024 15:13:45 +0200 Subject: [PATCH] Build PR images only after approval --- .github/workflows/build-images.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index 1a7b072..e79b64d 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -1,6 +1,8 @@ name: Build Docker images -on: [pull_request] +on: + pull_request_review: + types: [submitted] env: REGISTRY: ghcr.io @@ -8,6 +10,8 @@ env: jobs: build-and-push-image: + # Build image only if PR is approved to avoid having too many random images + if: github.event.review.state == 'approved' runs-on: ubuntu-latest permissions: contents: read