From 05d69ecd08ee03f14b32b99f98442e795997d2ad Mon Sep 17 00:00:00 2001 From: Jonathan Boniface Date: Mon, 28 Sep 2026 18:58:28 +0100 Subject: [PATCH] Rectifing workflow for lab build --- .gitea/workflows/build-lab.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build-lab.yml b/.gitea/workflows/build-lab.yml index ec76278..0437954 100644 --- a/.gitea/workflows/build-lab.yml +++ b/.gitea/workflows/build-lab.yml @@ -1,8 +1,8 @@ -name: Build and Push to ACR +name: Build and Push to ACR (lab) +# Dispatch only while the lab path is proven. Build and deploy the SAME commit: the deploy tags +# the image with the commit it was dispatched from. on: - push: - branches: [ dev ] workflow_dispatch: {} concurrency: @@ -16,11 +16,7 @@ jobs: build: name: Build and Push runs-on: ubuntu-latest - if: >- - github.ref != 'refs/heads/main' && ( - github.event_name == 'workflow_dispatch' || - (github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000') - ) + if: github.event_name == 'workflow_dispatch' permissions: contents: read id-token: write @@ -49,8 +45,8 @@ jobs: - name: Get ACR details run: | - ACR_NAME=$(az acr list --query "[0].name" -o tsv) - ACR_NAME="${ACR_NAME:-cruciblecoredevacr}" + # Pinned: `az acr list` returns whichever registry the identity sees first. + ACR_NAME=cruciblecoredevacr echo "ACR_NAME=$ACR_NAME" >> $GITHUB_ENV echo "ACR_LOGIN_SERVER=${ACR_NAME}.azurecr.io" >> $GITHUB_ENV echo "✓ Using ACR: ${ACR_NAME}.azurecr.io"