Skip to content

Commit 7d447d1

Browse files
Merge pull request #12 from coder/mes/site-check-script
fix: make site health check easier to use
2 parents a6c1e9c + 9780217 commit 7d447d1

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.env.example

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ---
2+
# These are used for the site health script, run from GitHub Actions. They can
3+
# be set manually if you need to run the script locally.
4+
5+
# Coder admins for Instatus can get this value from https://dashboard.instatus.com/developer
6+
export INSTATUS_API_KEY=
7+
8+
# Can be obtained from calling the Instatus API with a valid token. This value
9+
# might not actually need to be private, but better safe than sorry
10+
# https://instatus.com/help/api/status-pages
11+
export INSTATUS_PAGE_ID=
12+
13+
# Can be obtained from calling the Instatus API with a valid token. This value
14+
# might not actually need to be private, but better safe than sorry
15+
# https://instatus.com/help/api/components
16+
export INSTATUS_COMPONENT_ID=
17+
18+
# Can be grabbed from https://vercel.com/codercom/registry/stores/integration/upstash/store_1YDPuBF4Jd0aNpuV/guides
19+
# Please make sure that the token you use is KV_REST_API_TOKEN; the script needs
20+
# to be able to queries and mutations
21+
export VERCEL_API_KEY=
22+
23+
# ---

.github/scripts/check_registry_site_health.sh

100644100755
File mode changed.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Check modules health on registry.coder.com
2+
name: check-registry-site-health
3+
on:
4+
schedule:
5+
- cron: "0,15,30,45 * * * *" # Runs every 15 minutes
6+
workflow_dispatch: # Allows manual triggering of the workflow if needed
7+
8+
jobs:
9+
run-script:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Run check.sh
17+
run: |
18+
./.github/scripts/check_registry_site_health.sh
19+
env:
20+
INSTATUS_API_KEY: ${{ secrets.INSTATUS_API_KEY }}
21+
INSTATUS_PAGE_ID: ${{ secrets.INSTATUS_PAGE_ID }}
22+
INSTATUS_COMPONENT_ID: ${{ secrets.INSTATUS_COMPONENT_ID }}
23+
VERCEL_API_KEY: ${{ secrets.VERCEL_API_KEY }}

0 commit comments

Comments
 (0)