Skip to content

Commit 23c089c

Browse files
Docker Hub CI (#112)
1 parent 5419df9 commit 23c089c

File tree

4 files changed

+71
-91
lines changed

4 files changed

+71
-91
lines changed

.github/workflows/release.yml

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,60 @@ name: Release
22
on:
33
push:
44
tags:
5-
- '*.*.*'
5+
- "*.*.*"
66

77
jobs:
8-
build:
9-
name: Build
8+
release:
9+
name: Release
1010
runs-on: ubuntu-latest
1111
env:
1212
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1313
steps:
14-
- uses: actions/checkout@master
15-
- name: set env
16-
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
17-
- name: Set up Python
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: '3.8.x'
21-
- uses: snok/[email protected]
22-
- name: Install dependencies
23-
run: |
24-
sudo apt-get update -q
25-
sudo apt-get install libsodium-dev libsecp256k1-dev libgmp-dev -y
26-
poetry install -v
27-
- name: Run tests
28-
run: poetry run pytest tests/
29-
- name: Poetry publish
30-
run: |
31-
poetry config http-basic.pypi __token__ ${{secrets.PYPI_TOKEN}}
32-
poetry build
33-
poetry publish
34-
- name: Build github release
35-
uses: "marvinpinto/action-automatic-releases@latest"
36-
with:
37-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
38-
prerelease: false
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.8.x"
18+
- uses: snok/[email protected]
19+
20+
- name: Install project
21+
run: make install
22+
- name: Run lint
23+
run: make lint
24+
- name: Run tests
25+
run: make test
26+
27+
- name: Set up enviroment
28+
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
29+
30+
- name: Publish Docker image
31+
uses: elgohr/Publish-Docker-Github-Action@master
32+
with:
33+
name: dipdup/dipdup
34+
username: ${{ secrets.DOCKER_USERNAME }}
35+
password: ${{ secrets.DOCKER_PASSWORD }}
36+
tags: "latest,${{ env.RELEASE_VERSION }}"
37+
38+
- name: Publish Docker image (-pytezos)
39+
uses: elgohr/Publish-Docker-Github-Action@master
40+
env:
41+
PLUGINS: pytezos
42+
with:
43+
name: dipdup/dipdup
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
tags: "latest-pytezos,${{ env.RELEASE_VERSION }}-pytezos"
47+
buildargs: PLUGINS
48+
49+
- name: Publish package on PyPi
50+
run: |
51+
poetry config http-basic.pypi __token__ ${{secrets.PYPI_TOKEN}}
52+
poetry build
53+
poetry publish
54+
55+
- name: Publish GitHub release
56+
uses: "marvinpinto/action-automatic-releases@latest"
57+
with:
58+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
59+
prerelease: false
60+
61+

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on: push
3+
4+
jobs:
5+
test:
6+
name: Test
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
with:
12+
python-version: "3.8.x"
13+
- uses: snok/[email protected]
14+
15+
- name: Install project
16+
run: make install
17+
- name: Run lint
18+
run: make lint
19+
- name: Run tests
20+
run: make test

.github/workflows/tests.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

Dockerfile.pytezos

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)