Skip to content

Commit

Permalink
[CI] GHCR and docker image updates (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamazeem authored Oct 11, 2024
1 parent 9208a83 commit 5c29af6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
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

0 comments on commit 5c29af6

Please sign in to comment.