Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] GHCR and docker image updates #219

Merged
merged 6 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,14 @@ jobs:
run: |
./scripts/ci-update-homebrew-tap.sh

docker:
needs: [tag, ci]
ghcr:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: [tag]
runs-on: ubuntu-latest

permissions:
packages: write

env:
TAG: ${{ needs.tag.outputs.TAG }}

Expand All @@ -515,7 +519,6 @@ jobs:

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -525,7 +528,7 @@ jobs:
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: false
push: true
tags: |
zsv:${{ env.TAG }}
zsv:latest
ghcr.io/liquidaty/zsv:${{ env.TAG }}
ghcr.io/liquidaty/zsv:latest
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,27 @@ Please note:
- If you'd like to use additional parser features, or use the CLI as a Node
package, please feel free to post a request in an issue here.

#### GHCR (GitHub Container Registry)

`zsv` CLI also is available as a container image from
[Packages](https://github.com/liquidaty?tab=packages).

The container image is published on every release. In addition to the specific
release tag, the image is also tagged as `latest` i.e. `zsv:latest` always
points the latest released version.

Example:

```shell
$ docker pull ghcr.io/liquidaty/zsv
# ...
$ cat worldcitiespop_mil.csv | docker run -i ghcr.io/liquidaty/zsv count
1000000
```

For image details, see [Dockerfile](./Dockerfile). You may use this as a
baseline for your own use cases as needed.

### From source

See [BUILD.md](BUILD.md) for more details.
Expand Down