Skip to content

Commit 533322c

Browse files
committed
edit syntax for updating container
1 parent 5d8ae37 commit 533322c

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# to build and publish image onto github registry for use in azure
2-
name: Build docker image
2+
name: Build and deploy
33

44
on:
55
workflow_dispatch:
@@ -104,4 +104,4 @@ jobs:
104104
inlineScript: |
105105
az extension add --name containerapp --upgrade
106106
az containerapp update -n app -g formsg \
107-
--image ghcr.io/buildingblocs/formbbcs@sha-${GITHUB_SHA::7}
107+
--image ghcr.io/buildingblocs/formbbcs:sha-${GITHUB_SHA::7}

.github/workflows/deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and deploy
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
REGISTRY: ghcr.io
8+
IMAGE_NAME: buildingblocs/formbbcs
9+
10+
jobs:
11+
deploy:
12+
needs: build
13+
runs-on: ubuntu-latest
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- name: Login to azure
20+
uses: azure/login@v2
21+
with:
22+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
23+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
24+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
25+
26+
- name: Deploy new app
27+
uses: azure/cli@v2
28+
with:
29+
inlineScript: |
30+
az extension add --name containerapp --upgrade
31+
az containerapp update -n app -g formsg \
32+
--image ghcr.io/buildingblocs/formbbcs:main

0 commit comments

Comments
 (0)