-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jon Hemstreet <jon.hemstreet@unanet.com> Co-authored-by: Nathan Zender <github@nathanzender.com>
- Loading branch information
1 parent
487514d
commit ed4b1b3
Showing
6 changed files
with
94 additions
and
1 deletion.
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,19 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish_docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: hunyadi/md2conf | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: Dockerfile_dist | ||
tags: "latest,${{ github.ref_name }}" |
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,27 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
pypi-publish: | ||
name: Publish release to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip3 install build | ||
- name: Build package | ||
run: | | ||
python -m build --wheel --sdist | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_ID_TOKEN }} |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ __pycache__ | |
/*.egg-info | ||
.envrc | ||
.venv | ||
.idea |
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
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,19 @@ | ||
ARG PYTHON_VERSION=3.9 | ||
|
||
FROM python:${PYTHON_VERSION}-alpine as builder | ||
|
||
COPY ./ ./ | ||
|
||
RUN python3 -m pip install --upgrade pip && \ | ||
pip install build && \ | ||
python -m build --wheel | ||
|
||
FROM python:${PYTHON_VERSION}-alpine as runner | ||
|
||
COPY --from=builder /dist/*.whl dist/ | ||
|
||
RUN python3 -m pip install `ls -1 dist/*.whl` && \ | ||
apk add --update nodejs npm && \ | ||
npm install -g @mermaid-js/mermaid-cli | ||
|
||
ENTRYPOINT ["python3", "-m", "md2conf"] |
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