Skip to content

Commit

Permalink
Add push container image GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Nov 13, 2023
1 parent b422abe commit 39cf37b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 39cf37b

Please sign in to comment.