Skip to content

Commit d4fdece

Browse files
committed
ci: add status check
1 parent 016f89f commit d4fdece

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ jobs:
1616
preview:
1717
runs-on: ubuntu-latest
1818

19-
permissions:
20-
contents: read
21-
pull-requests: write
22-
2319
steps:
2420
- name: Checkout branch
2521
if: github.event.action != 'closed'
@@ -39,6 +35,13 @@ jobs:
3935
with:
4036
version: v1.33.0
4137

38+
- name: Set pending status
39+
uses: myrotvorets/set-commit-status-action@v2.0.1
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
context: Preview deployed
43+
status: pending
44+
4245
- name: Set up Kustomize
4346
uses: imranismail/setup-kustomize@v2
4447

@@ -103,6 +106,14 @@ jobs:
103106
**URL:** https://${{ steps.vars.outputs.branch }}.piveau-ln-preview.zazukoians.org/
104107
**Note:** It may take a few minutes for the DNS to propagate, the certificate to be generated and the preview to be reachable.
105108
109+
- name: Final status check
110+
uses: myrotvorets/set-commit-status-action@v2.0.1
111+
with:
112+
token: ${{ secrets.GITHUB_TOKEN }}
113+
context: Preview deployed
114+
status: success
115+
targetUrl: https://${{ steps.vars.outputs.branch }}.piveau-ln-preview.zazukoians.org/
116+
106117
- name: Delete manifests
107118
working-directory: ./opendata.swiss/ui/k8s
108119
if: github.event.action == 'closed'

0 commit comments

Comments
 (0)