Skip to content

Commit 458fa3f

Browse files
Add merge_group trigger and fix Docker caching in CI workflows
- PR-Build-And-Test.yml: Add merge_group trigger so Docker validation and tests run in the GitHub merge queue - PR-Build-And-Test.yml: Replace outputs: type=docker,dest=*.tar with push: false — tar was never uploaded as artifact; this skips the slow layer extraction while still populating the GHA cache - Build-Test-And-Deploy.yml: Remove dead "Docker build (no push)" step whose condition (pull_request || merge_group) could never be true since the workflow only triggers on push to main and workflow_dispatch; PR/merge_group validation is now handled by PR-Build-And-Test.yml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c23d291 commit 458fa3f

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,6 @@ jobs:
6363
- name: Set up Docker Buildx
6464
uses: docker/setup-buildx-action@v4
6565

66-
# Build but no push with a PR
67-
- name: Docker build (no push)
68-
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
69-
uses: docker/build-push-action@v7
70-
with:
71-
push: false
72-
tags: temp-pr-validation
73-
file: ./EssentialCSharp.Web/Dockerfile
74-
context: .
75-
build-args: ACCESS_TO_NUGET_FEED=false
76-
7766
# Only build for dev registry — prod gets the image via az acr import in deploy-production
7867
- name: Build Container Image
7968
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: PR Build and Test EssentialCSharp.Web
33
on:
44
pull_request:
55
branches: ["main"]
6+
merge_group:
67
workflow_dispatch:
78

89
jobs:
@@ -67,7 +68,7 @@ jobs:
6768
with:
6869
file: ./EssentialCSharp.Web/Dockerfile
6970
context: .
70-
outputs: type=docker,dest=${{ github.workspace }}/essentialcsharpwebimage.tar
71+
push: false
7172
cache-from: type=gha
7273
cache-to: type=gha,mode=max
7374
build-args: ACCESS_TO_NUGET_FEED=false

0 commit comments

Comments
 (0)