-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add publish and release CI configuration (#2)
* Add publish and release CI configuration * Add dockerfile * Update Dockerfile Co-authored-by: Michał Praszmo <[email protected]> Co-authored-by: Michał Praszmo <[email protected]>
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build and push docker images | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build_core: | ||
name: Build image | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Build and push the image | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: ./Dockerfile | ||
repository: certpl/${{ github.event.repository.name }} | ||
tags: ${{ github.sha }} | ||
push: ${{ github.event_name == 'push' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Release a new version | ||
|
||
on: | ||
push: | ||
tags: 'v*.*.*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build package | ||
run: | | ||
pip3 install setuptools wheel | ||
python3 setup.py bdist_wheel | ||
- name: Publish to PyPi | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM python:3.7 | ||
|
||
WORKDIR /app/service | ||
COPY ./requirements.txt ./requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
COPY ./karton ./karton | ||
COPY ./setup.py ./setup.py | ||
RUN pip install . | ||
CMD karton-mwdb-reporter |