From d00f2ae6169c7f904fa0662f62a4a6e3c1143685 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 4 Jun 2023 11:53:21 +0200 Subject: [PATCH] added the ability to detect branch changes in the deployment additions --- .github/workflows/add-deployment.yaml | 2 +- .github/workflows/remove-deployment.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/add-deployment.yaml b/.github/workflows/add-deployment.yaml index 27e5ccd01..517ff9ae7 100644 --- a/.github/workflows/add-deployment.yaml +++ b/.github/workflows/add-deployment.yaml @@ -3,7 +3,7 @@ name: Add a new Deployment on: pull_request: branches: [main] - types: [opened, reopened] + types: [opened, reopened, edited] jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/remove-deployment.yml b/.github/workflows/remove-deployment.yml index 476121d5a..8e6f21e4c 100644 --- a/.github/workflows/remove-deployment.yml +++ b/.github/workflows/remove-deployment.yml @@ -2,9 +2,10 @@ name: Remove a Deployment on: pull_request: - types: [closed] + types: [closed, edited] jobs: deploy: + if: github.event.pull_request.action != edited || github.event.changes.base.ref.from != 'refs/heads/main' runs-on: ubuntu-latest permissions: contents: write