Skip to content

Commit 806cf58

Browse files
committed
Add github action to build and publish docker image
1 parent ec02207 commit 806cf58

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.github/workflows/build.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
packages: write
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
- name: Log in to the Container registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Build and push Docker image
25+
id: push
26+
uses: docker/build-push-action@v6
27+
with:
28+
context: docker
29+
push: true
30+
tags: ghcr.io/${{github.repository}}:latest

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.7-alpine
1+
FROM python:3.10-alpine
22

33
RUN apk update \
44
&& apk add --no-cache --virtual .build-deps git g++ postgresql-dev yaml-dev \

requirements.server.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# These requirements are what you would install on a production server.
22
.
3-
psycopg2==2.8
3+
psycopg2==2.9.10
44
gunicorn==19.9.0
55
progressbar2

0 commit comments

Comments
 (0)