diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..14f1273 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.github +LICENSE +README.md diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..bb815d9 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,9 @@ +workflow "Main workflow" { + on = "push" + resolves = ["docker-build"] +} + +action "docker-build" { + uses = "actions/docker/cli@master" + args = "build -t abatilo/actions-poetry ." +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..84b6800 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.7.3-stretch + +LABEL "com.github.actions.name"="poetry - Python" +LABEL "com.github.actions.description"="GitHub Actions for Python projects using poetry" +LABEL "com.github.actions.icon"="package" +LABEL "com.github.actions.color"="blue" + +LABEL "repository"="https://github.com/abatilo/actions-poetry" +LABEL "homepage"="https://github.com/abatilo/actions-poetry" +LABEL "maintainer"="abatilo" + +RUN pip install poetry==0.12.16 + +ENTRYPOINT [ "/usr/local/bin/poetry" ] diff --git a/README.md b/README.md index c5d308f..5ce7a61 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,40 @@ # actions-poetry GitHub Actions for Python projects using poetry + +[![license](https://img.shields.io/github/license/abatilo/actions-poetry.svg)](https://github.com/abatilo/actions-poetry/blob/master/LICENSE) +[![release](https://img.shields.io/github/release/abatilo/actions-poetry.svg)](https://github.com/abatilo/actions-poetry/releases/latest) +[![GitHub release date](https://img.shields.io/github/release-date/abatilo/actions-poetry.svg)](https://github.com/abatilo/actions-poetry/releases) + +- [sdispater/poetry: Python dependency management and packaging made easy.](https://github.com/sdispater/poetry) + +## Getting started + +| Branch | Base image | +| ------ | ---------------------- | +| 3.7.3 | `python:3.7.3-stretch` | + +### Create `main.workflow` + +```hcl +workflow "Python workflow" { + on = "push" + resolves = ["publish"] +} + +action "publish" { + needs = "poetry-build" + uses = "abatilo/actions-poetry@3.7.3" + args = ["publish", "--build", "--no-interaction", "-vv", "--username", "$PYPI_USERNAME", "--password", "$PYPI_PASSWORD"] +} +``` + +## License + +[MIT License - abatilo/actions-poetry] + +[MIT License - abatilo/actions-poetry]: https://github.com/abatilo/actions-poetry/blob/master/LICENSE + + +## About the author + +- [abatilo's homepage](https://www.aaronbatilo.dev/)