Skip to content

Commit

Permalink
Build PR images only after approval
Browse files Browse the repository at this point in the history
  • Loading branch information
adidenko committed Jun 20, 2024
1 parent 631a46c commit c25f204
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Build Docker images

on: [pull_request]
on:
pull_request_review:
types: [submitted]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

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
Expand Down

0 comments on commit c25f204

Please sign in to comment.