File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .venv
Original file line number Diff line number Diff line change 1+ name : build
2+
3+ env :
4+ REGISTRY : ghcr.io
5+ IMAGE_NAME : ${{ github.repository }}
6+
7+ on :
8+ push :
9+ branches : [main]
10+ pull_request :
11+ branches : [main]
12+
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ jobs :
18+ lint :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v2
22+ - name : Log in to the Container registry
23+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
31+ with :
32+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
35+ with :
36+ context : .
37+ push : true
38+ tags : ${{ steps.meta.outputs.tags }}
39+ labels : ${{ steps.meta.outputs.labels }}
40+
Original file line number Diff line number Diff line change 1+ name : lint
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ lint :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Set up Python 3.11
18+ uses : actions/setup-python@v3
19+ with :
20+ python-version : " 3.11"
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install poetry flake8
25+ poetry install
26+ - name : Lint with flake8
27+ run : |
28+ poetry run flake8
29+
Original file line number Diff line number Diff line change 1- FROM python:3.11
1+ FROM python:3.11-alpine
22
33# Configure Poetry
44ENV POETRY_VERSION=1.7.0
You can’t perform that action at this time.
0 commit comments