File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Package publish
2+
3+ on :
4+ release :
5+ types :
6+ - created
7+
8+ jobs :
9+ push :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ packages : write
13+ contents : read
14+ env :
15+ IMAGE_NAME : meffec-server
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Build image
20+ run : |
21+ docker build -f Server/Dockerfile Server --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
22+
23+ - name : Log in to GHCR
24+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
25+
26+ - name : Push image
27+ run : |
28+ IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
29+ IMAGE_ID=$(echo "$IMAGE_ID" | tr '[:upper:]' '[:lower:]')
30+ VERSION="${{ github.event.release.tag_name }}"
31+ VERSION="${VERSION#v}"
32+ echo IMAGE_ID=$IMAGE_ID
33+ echo VERSION=$VERSION
34+ docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
35+ docker tag $IMAGE_NAME $IMAGE_ID:latest
36+ docker push $IMAGE_ID:$VERSION
37+ docker push $IMAGE_ID:latest
Original file line number Diff line number Diff line change 1+ FROM python:3.12-slim
2+
3+ WORKDIR /meffec
4+
5+ ENV PYTHONDONTWRITEBYTECODE=1 \
6+ PYTHONUNBUFFERED=1
7+
8+ RUN apt-get update && apt-get install -y --no-install-recommends \
9+ && rm -rf /var/lib/apt/lists/*
10+
11+ COPY Server/requirements.txt .
12+ RUN python -m pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
13+
14+ COPY Server/ .
15+
16+ CMD ["python" , "meffec_server.py" ]
Original file line number Diff line number Diff line change 1+ websockets == 12.0
2+ python-dotenv == 1.0.1
You can’t perform that action at this time.
0 commit comments