From 1243b25e636bcf878d772b3c4363efe02630bdf8 Mon Sep 17 00:00:00 2001 From: Oscar Wieman Date: Mon, 7 Aug 2023 20:46:56 +0200 Subject: [PATCH] Only deploy to a dithub envirionment when the preview label is set --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index af7571185..e7e75103b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -137,8 +137,8 @@ jobs: contents: write steps: - name: Branch deploy info - if: ${{ github.event_name == 'pull_request' }} - run: echo "ArgoCD might already be at it if the 'preview' label is set." + if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'preview') }} + run: echo "ArgoCD will try to update this deployment shortly." - name: Checkout if: ${{ github.event_name != 'pull_request' }}