diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml new file mode 100644 index 000000000..3ca2540f1 --- /dev/null +++ b/.github/workflows/container.yml @@ -0,0 +1,22 @@ +name: Publish container + +on: + workflow_run: + workflows: [test] + types: + - completed + branches: + - master + +jobs: + publish_container: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - run: podman login -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io + - run: podman build -t ghcr.io/${{ github.repository }} . + - run: podman push ghcr.io/${{ github.repository }} diff --git a/Containerfile b/Containerfile index c31caedb2..ed3cb2074 100644 --- a/Containerfile +++ b/Containerfile @@ -4,4 +4,4 @@ COPY pyproject.toml README.md LICENSE . COPY src src RUN python -m pip install -U pip RUN python -m pip install --use-pep517 . -ENTRYPOINT bash +ENTRYPOINT ["wiktwords"] diff --git a/README.md b/README.md index 2ca2d92eb..b4aff9310 100644 --- a/README.md +++ b/README.md @@ -304,8 +304,7 @@ word `thrill` as an English verb (only one part-of-speech is shown here): #### Use container: ``` -$ podman build -t wiktextract . -$ podman run -it --rm wiktextract wiktwords --help +$ podman run -it --rm ghcr.io/tatuylonen/wiktextract --help ``` #### Install from source: