Skip to content

Commit 9628d00

Browse files
CI: Fix trigger bug
Not sure how this has survived so long...
1 parent 96b41c1 commit 9628d00

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/Build-Test-And-Deploy.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151
run: dotnet test --no-build --configuration Release
5252

5353
- name: Set up Docker Buildx
54-
if: github.event_name != 'pull_request_target'
54+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
5555
uses: docker/setup-buildx-action@v3
5656

5757
- name: Build Container Image
58-
if: github.event_name != 'pull_request_target'
58+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
5959
uses: docker/build-push-action@v6
6060
with:
6161
tags: ${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb:${{ github.sha }},${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb:latest,${{ vars.PRODCONTAINER_REGISTRY }}/essentialcsharpweb:${{ github.sha }},${{ vars.PRODCONTAINER_REGISTRY }}/essentialcsharpweb:latest
@@ -73,7 +73,7 @@ jobs:
7373
path: ${{ github.workspace }}/essentialcsharpwebimage.tar
7474

7575
deploy-development:
76-
if: github.event_name != 'pull_request_target'
76+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
7777
runs-on: ubuntu-latest
7878
needs: build-and-test
7979
environment:
@@ -99,19 +99,19 @@ jobs:
9999
docker image ls -a
100100
101101
- name: Log in to container registry
102-
if: github.event_name != 'pull_request_target'
102+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
103103
uses: docker/login-action@v3
104104
with:
105105
registry: ${{ vars.DEVCONTAINER_REGISTRY }}
106106
username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }}
107107
password: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }}
108108

109109
- name: Push Image to Container Registry
110-
if: github.event_name != 'pull_request_target'
110+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
111111
run: docker push --all-tags ${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb
112112

113113
- name: Create and Deploy to Container App
114-
if: github.event_name != 'pull_request_target'
114+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
115115
uses: azure/CLI@v2
116116
env:
117117
CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }}
@@ -161,7 +161,7 @@ jobs:
161161
az account clear
162162
163163
deploy-production:
164-
if: github.event_name != 'pull_request_target'
164+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
165165
runs-on: ubuntu-latest
166166
needs: [deploy-development]
167167
environment:
@@ -187,15 +187,15 @@ jobs:
187187
docker image ls -a
188188
189189
- name: Log in to container registry
190-
if: github.event_name != 'pull_request_target'
190+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
191191
uses: docker/login-action@v3
192192
with:
193193
registry: ${{ vars.PRODCONTAINER_REGISTRY }}
194194
username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }}
195195
password: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }}
196196

197197
- name: Push Image to Container Registry
198-
if: github.event_name != 'pull_request_target'
198+
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
199199
run: docker push --all-tags ${{ vars.PRODCONTAINER_REGISTRY }}/essentialcsharpweb
200200

201201
- name: Create and Deploy to Container App

0 commit comments

Comments
 (0)