From bd9c0e58574b1b44548117d3e0d81d126a2ba2a3 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Thu, 14 Mar 2024 21:31:22 -0600 Subject: [PATCH] Run docker-image workflow when PRs on main are merged --- .github/workflows/docker-image.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ec2e591..3962639 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -4,9 +4,15 @@ on: branches: main tags: - '*' + pull_request: + types: + closed + branches: + - 'main' jobs: push_to_registry: + if: github.event.pull_request.merged == true name: Push Docker image to GitHub Packages runs-on: ubuntu-latest steps: @@ -43,4 +49,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }}