Skip to content

Commit 6717c11

Browse files
authored
Merge pull request #8 from encryption4all/add-health-endpoint-and-workflow-dispatch
Add health endpoint and workflow_dispatch trigger
2 parents b323ad2 + 73ff967 commit 6717c11

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/docker-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
tags:
88
- 'v*.*.*'
9+
workflow_dispatch:
910

1011
env:
1112
REGISTRY: ghcr.io
@@ -61,9 +62,10 @@ jobs:
6162
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6263
tags: |
6364
type=ref,event=branch,suffix=-edge
65+
type=ref,event=pr,prefix=pr-
6466
type=semver,pattern={{version}}
6567
type=semver,pattern={{major}}.{{minor}}
66-
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' }}
68+
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
6769
6870
- name: Build and push Docker image
6971
uses: docker/build-push-action@v5

docker/nginx.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ http {
4747
add_header X-Frame-Options "SAMEORIGIN" always;
4848
add_header Referrer-Policy "no-referrer" always;
4949

50+
location /health {
51+
access_log off;
52+
return 200 "healthy\n";
53+
add_header Content-Type text/plain;
54+
}
55+
5056
location ~ ^/(mitm.html|sw.js) {
5157
charset UTF-8;
5258
add_header Cache-Control "no-cache";

0 commit comments

Comments
 (0)