This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
72 lines (60 loc) · 2.13 KB
/
release-master.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
72
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
tags:
- 5.*
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:maxmind/ppa
sudo apt-get update
sudo apt-get install geoipupdate libsnappy-dev
echo "UserId ${{ secrets.mm_userid }}" | sudo tee /etc/GeoIP.conf > /dev/null
echo "LicenseKey ${{ secrets.mm_lic }}" | sudo tee -a /etc/GeoIP.conf > /dev/null
echo 'ProductIds GeoLite2-Country GeoLite2-City GeoLite2-ASN' | sudo tee -a /etc/GeoIP.conf > /dev/null
sudo geoipupdate -v
python -m pip install --upgrade pip
pip install -r dev_requirements.txt
python setup.py develop
make test
python setup.py sdist
docker:
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:maxmind/ppa
sudo apt-get update
sudo apt-get install geoipupdate libsnappy-dev
pip install -r requirements.txt
python setup.py develop
python setup.py sdist
ls -all dist/
mv dist/cif-*.tar.gz dist/cif-5.0.tar.gz
cd docker && bash build.sh && bash tag.sh
cif-router --version
- name: tag and push to hub.docker.com
if: startsWith(github.event.ref, 'refs/tags')
run: |
echo "uploading to docker..."