Skip to content

Commit 1b6e7ec

Browse files
author
OpenClaw
committed
Initial: Python example with ReleaseRun Action
0 parents  commit 1b6e7ec

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

.github/workflows/stack-health.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Stack Health Check
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: '0 9 * * 1'
8+
9+
jobs:
10+
health-check:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: Releaserun/releaserun-action@v2
18+
with:
19+
fail-on: 'D'
20+
comment: 'true'

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:3.13-slim
2+
WORKDIR /app
3+
COPY requirements.txt .
4+
RUN pip install --no-cache-dir -r requirements.txt
5+
COPY . .
6+
EXPOSE 8000
7+
CMD ["gunicorn", "app:application", "--bind", "0.0.0.0:8000"]

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ReleaseRun Action Example: Python
2+
3+
This repo shows how to use [ReleaseRun's GitHub Action](https://github.com/marketplace/actions/releaserun-stack-health-check) on a Python/Django project.
4+
5+
## What it does
6+
7+
The action scans your `requirements.txt` and `Dockerfile`, checks every runtime against [ReleaseRun](https://releaserun.com) for:
8+
9+
- **Version freshness**
10+
- **EOL status**
11+
- **Known CVEs**
12+
- **Overall health grade** (A through F)
13+
14+
Results show up as a PR comment. If anything scores below your threshold, the check fails.
15+
16+
## Setup
17+
18+
Copy `.github/workflows/stack-health.yml` into your repo. No API keys needed.
19+
20+
## Links
21+
22+
- [GitHub Action Marketplace](https://github.com/marketplace/actions/releaserun-stack-health-check)
23+
- [ReleaseRun Tools](https://releaserun.com/tools/)
24+
- [Badge Service](https://releaserun.com/badges/docs/)

app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from django.http import JsonResponse
2+
3+
def application(environ, start_response):
4+
return JsonResponse({"status": "ok"})

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
django==5.2
2+
celery==5.4.0
3+
redis==5.2.0
4+
psycopg2-binary==2.9.10
5+
gunicorn==23.0.0

0 commit comments

Comments
 (0)