Skip to content

Commit eab00d5

Browse files
committed
ci: apply/delete manifests
1 parent e0f6cf4 commit eab00d5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/previews-ods-ui.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: "[UI] Handle previews on PR"
22

33
on:
44
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- closed
510
paths:
611
- "opendata.swiss/ui/**" # Only trigger if files in the ui directory change
712
- ".github/workflows/previews-ods-ui.yaml" # Trigger also if this workflow file is changed
@@ -56,3 +61,16 @@ jobs:
5661
kustomize edit set image "ghcr.io/opendata-swiss/ods-ui=ghcr.io/opendata-swiss/ods-ui:sha-${{ steps.vars.outputs.short_sha }}"
5762
kustomize edit set label "app.kubernetes.io/instance:${{ steps.vars.outputs.branch }}"
5863
kustomize build | tee manifest.yaml
64+
65+
- name: Apply manifests
66+
working-directory: ./opendata.swiss/ui/k8s
67+
if: github.event.action != 'closed'
68+
run: |
69+
kubectl apply -f manifest.yaml
70+
71+
- name: Delete manifests
72+
working-directory: ./opendata.swiss/ui/k8s
73+
if: github.event.action == 'closed'
74+
continue-on-error: true
75+
run: |
76+
kubectl delete -f manifest.yaml

0 commit comments

Comments
 (0)