Rectifing workflow for lab build
This commit is contained in:
@@ -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:
|
on:
|
||||||
push:
|
|
||||||
branches: [ dev ]
|
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -16,11 +16,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build and Push
|
name: Build and Push
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >-
|
if: github.event_name == 'workflow_dispatch'
|
||||||
github.ref != 'refs/heads/main' && (
|
|
||||||
github.event_name == 'workflow_dispatch' ||
|
|
||||||
(github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000')
|
|
||||||
)
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
@@ -49,8 +45,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Get ACR details
|
- name: Get ACR details
|
||||||
run: |
|
run: |
|
||||||
ACR_NAME=$(az acr list --query "[0].name" -o tsv)
|
# Pinned: `az acr list` returns whichever registry the identity sees first.
|
||||||
ACR_NAME="${ACR_NAME:-cruciblecoredevacr}"
|
ACR_NAME=cruciblecoredevacr
|
||||||
echo "ACR_NAME=$ACR_NAME" >> $GITHUB_ENV
|
echo "ACR_NAME=$ACR_NAME" >> $GITHUB_ENV
|
||||||
echo "ACR_LOGIN_SERVER=${ACR_NAME}.azurecr.io" >> $GITHUB_ENV
|
echo "ACR_LOGIN_SERVER=${ACR_NAME}.azurecr.io" >> $GITHUB_ENV
|
||||||
echo "✓ Using ACR: ${ACR_NAME}.azurecr.io"
|
echo "✓ Using ACR: ${ACR_NAME}.azurecr.io"
|
||||||
|
|||||||
Reference in New Issue
Block a user