-
Notifications
You must be signed in to change notification settings - Fork 753
45 lines (43 loc) · 1.59 KB
/
docker.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
name: Build Docker image
on: [push, pull_request]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: python3 -m pip install -r docker/requirements.txt
- name: Install opengrok-tools
run: python3 setup.py install
working-directory: tools
- name: Install checkers
run: python3 -m pip install pylint flake8 black isort
- name: Run flake8
run: flake8 --max-line-length 119 docker/*.py
- name: Run pylint
run: pylint -E --max-line-length 119 docker/*.py
- name: Run black in check mode
run: black --check docker/*.py
- name: Run isort in check mode
run: isort --settings-file docker/.isort.cfg docker/*.py --check --diff
- name: Build and optionally push Docker image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
OPENGROK_REPO_SLUG: ${{ github.repository }}
OPENGROK_PULL_REQUEST: ${{ github.head_ref }}
OPENGROK_REF: ${{ github.ref }}
run: ./dev/docker.sh
- name: Install Python pre-requisites
run: python3 -m pip install requests
- name: Optionally update README on Docker hub
env:
OPENGROK_REPO_SLUG: ${{ github.repository }}
OPENGROK_PULL_REQUEST: ${{ github.head_ref }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: ./dev/dockerhub_readme.py