Skip to content

Commit

Permalink
[update]
Browse files Browse the repository at this point in the history
  • Loading branch information
boke0 committed Mar 8, 2021
1 parent eca1a12 commit 0ff7043
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [created]

jobs:
deploy-pypi:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -19,15 +19,25 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry poetry-dynamic-versioning twine
- name: Build package and publish
pip install poetry poetry-dynamic-versioning
- name: Build package
run: poetry build
deploy-pypi:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry build
twine upload dist/*
run: twine upload dist/*
deploy-docker:
needs: build
runs-on: ubuntu-latest
steps:
- name: Docker meta
Expand All @@ -50,6 +60,7 @@ jobs:
tags: mitamaorg/mitama:latest, ${{ steps.docker_meta.outputs.tags }}
file: ./Dockerfile
deploy-docker-mysql:
needs: build
runs-on: ubuntu-latest
steps:
- name: Docker login
Expand All @@ -72,6 +83,7 @@ jobs:
tags: mitamaorg/mitama:latest-mysql, ${{ steps.docker_meta_mysql.outputs.tags }}
file: ./Dockerfile.mysql
deploy-docker-postgresql:
needs: build
runs-on: ubuntu-latest
steps:
- name: Docker login
Expand Down
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM alpine:3.13
RUN mkdir /code
ADD ./mitama /code/mitama
ADD ./pyproject.toml /code/pyproject.toml
ADD ./.git /code/.git
WORKDIR /code
RUN mkdir /pkg
ADD /dist /pkg
WORKDIR /pkg
RUN apk add --no-cache python3 python3-dev py3-pip libmagic nginx build-base gcc libffi-dev openssl-dev rust cargo zlib-dev jpeg-dev nginx postfix git \
&& pip3 install --upgrade pip \
&& pip3 install uwsgi poetry wheel poetry-dynamic-versioning \
&& poetry config virtualenvs.create false \
&& poetry install --no-dev \
&& pip3 install uwsgi poetry \
&& pip3 install /pkg/* \
&& apk del --purge zlib-dev gcc openssl-dev rust cargo python3-dev build-base libffi-dev
RUN mkdir /conf
RUN mkdir /log
Expand Down
15 changes: 6 additions & 9 deletions Dockerfile.mysql
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM alpine:3.13
RUN mkdir /code
ADD ./mitama /code/mitama
ADD ./pyproject.toml /code/pyproject.toml
ADD ./.git /code/.git
WORKDIR /code
RUN apk add --no-cache python3 python3-dev py3-pip libmagic nginx build-base gcc libffi-dev openssl-dev rust cargo zlib-dev jpeg-dev nginx postfix mariadb-dev mariadb-connector-c-dev\
RUN mkdir /pkg
ADD /dist /pkg
WORKDIR /pkg
RUN apk add --no-cache python3 python3-dev py3-pip libmagic nginx build-base gcc libffi-dev openssl-dev rust cargo zlib-dev jpeg-dev nginx postfix mariadb-dev mariadb-connector-c-dev git \
&& pip3 install --upgrade pip \
&& pip3 install uwsgi poetry mysqlclient wheel poetry-dynamic-versioning git \
&& poetry config virtualenvs.create false \
&& poetry install --no-dev \
&& pip3 install uwsgi poetry mysqlclient \
&& pip3 install /pkg/* \
&& apk del --purge zlib-dev gcc openssl-dev rust cargo python3-dev build-base libffi-dev mariadb-dev
RUN mkdir /conf
RUN mkdir /log
Expand Down
15 changes: 6 additions & 9 deletions Dockerfile.postgresql
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM alpine:3.13
RUN mkdir /code
ADD ./mitama /code/mitama
ADD ./pyproject.toml /code/pyproject.toml
ADD ./.git /code/.git
WORKDIR /code
RUN apk add --no-cache python3 python3-dev py3-pip libmagic nginx build-base gcc libffi-dev openssl-dev rust cargo zlib-dev jpeg-dev nginx postfix postgresql-dev postgresql-libs git \
RUN mkdir /pkg
ADD /dist /pkg
WORKDIR /pkg
RUN apk add --no-cache python3 python3-dev py3-pip libmagic nginx build-base gcc libffi-dev openssl-dev rust cargo zlib-dev jpeg-dev nginx postfix postgresql-dev postgresql-libs \
&& pip3 install --upgrade pip \
&& pip3 install uwsgi poetry psycopg2 wheel poetry-dynamic-versioning \
&& poetry config virtualenvs.create false \
&& poetry install --no-dev \
&& pip3 install uwsgi poetry psycopg2 \
&& pip3 install /pkg/* \
&& apk del --purge zlib-dev gcc openssl-dev rust cargo python3-dev build-base libffi-dev postgresql-dev
RUN mkdir /conf
RUN mkdir /log
Expand Down

0 comments on commit 0ff7043

Please sign in to comment.