Skip to content

Commit a826770

Browse files
add gh sha for deploy
1 parent 972e966 commit a826770

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/build-apps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.app }}
4343
tags: |
44-
type=sha
44+
type=raw,value=sha-${{ github.sha }}
4545
type=raw,value=latest
4646
labels: |
4747
org.opencontainers.image.source=${{ github.repository }}

.github/workflows/deploy-apps.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ jobs:
2727
2828
- name: Apply K8s manifests
2929
run: kubectl apply -f infra/k8s/items-app-deployment.yaml
30+
31+
- name: Update deployment image to current SHA
32+
run: |
33+
kubectl set image deployment/items-app items-app=ghcr.io/${{ github.repository_owner }}/items-app:sha-${{ github.sha }} -n default
34+
35+
- name: Wait for rollout
36+
run: kubectl rollout status deployment/items-app -n default

0 commit comments

Comments
 (0)