-
Notifications
You must be signed in to change notification settings - Fork 25
71 lines (52 loc) · 1.9 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Publish release (Docker & Pip)
on:
release:
types: [published]
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install pipenv
run: |
python -m pip install --upgrade poetry wheel
- id: cache-pipenv
uses: actions/cache@v1
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
make install
- name: Run test suite
run: make test
- name: Run compatibility tests
run: make test-compat-min && make test-compat-max
- name: Push package on pypi
run: API_TOKEN=${{ secrets.DAVID_PYPI_TOKEN }} make distribute
- name: Build the api Docker image
run: docker build --build-arg VERSION=$(poetry version -s) . --file Dockerfile --tag ghcr.io/boavizta/boaviztapi:latest
- name : Tag api Docker image
run: docker tag ghcr.io/boavizta/boaviztapi:latest ghcr.io/boavizta/boaviztapi:$(poetry version -s)
- name: Push api images
run: docker push -a ghcr.io/boavizta/boaviztapi
- name: Build doc the Docker image
run: docker build docs --file docs/Dockerfile --tag ghcr.io/boavizta/boaviztapi-doc:latest
- name: Tag doc the Docker image
run: docker tag ghcr.io/boavizta/boaviztapi-doc:latest ghcr.io/boavizta/boaviztapi-doc:$(poetry version -s)
- name: Push doc images
run: docker push -a ghcr.io/boavizta/boaviztapi-doc