Skip to content

Commit

Permalink
Add publish and release CI configuration (#2)
Browse files Browse the repository at this point in the history
* Add publish and release CI configuration

* Add dockerfile

* Update Dockerfile

Co-authored-by: Michał Praszmo <nazywam@gmail.com>

Co-authored-by: Michał Praszmo <nazywam@gmail.com>
  • Loading branch information
msm-code and nazywam authored Dec 22, 2020
1 parent bbba591 commit 2ed5efe
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
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/build-push-action@v1.1.0
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' }}
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
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/gh-action-pypi-publish@v1.3.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
9 changes: 9 additions & 0 deletions Dockerfile
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-autoit-ripper

0 comments on commit 2ed5efe

Please sign in to comment.