This is a Github Action that will run zkg install on a Zeek
package for a variety of Zeek versions. It runs Debian 13 via Docker.
The action supports the following inputs:
-
pkg: the name, URL, or local path of the package to install. Defaults to ".", which installs a locally cloned Zeek package. Precede this action withactions/checkoutto use this default on a Zeek package repository.🚨 With local git clones,
zkg's default version selection logic works differently. Instead of looking for the latest version tag and falling back to the default branch, it will install the checked-out state. If you'd like to test withzkg's regular behavior, use the followingpkgline:with: pkg: ${{ github.server_url }}/${{ github.repository }}You do not need
action/checkoutin this setting, sincezkgwill install straight from the repository's URL. -
pkg_version: the version of the package. Defaults to zkg's version-determination algorithm. You can provide a git tag, branch, or SHA-1 commit hash.🚨 If you're running the action on a local clone with a version tag, make sure to pass
with: fetch-depth: 0(or a sufficient depth) toactions/checkout, so the git tags are available in the clone. -
pkg_sysdeps: additional Debian packages to install in order to satisfy external dependencies required by the package. -
pkg_uservars: if the package requires user variable definitions, use this input to provide them as space-separated list of "name=value" pairs. -
zeek_version: the Zeek version to use, based on our binary packages:zeekfor the latest release,zeek-ltsfor the latest long-term-support release, andzeek-nightlyfor the latest nightly Zeek build. LTS release versions can also be pinned usingzeek-6.0. -
load_packages: when enabled (by passingyes,true, or1), a successful package installation via zkg is followed by a parse-only Zeek invocation that loads all of zkg's installed packages. This can catch basic problems in a package that doesn't include tests, but also detect more subtle ones that its tests might not cover.
Test the local Zeek package sources at version v1.2.3, with the LTS release:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: zeek/action-zkg-install@v2
with:
pkg_version: v1.2.3
zeek_version: zeek-ltsUse zkg's default install logic, with the Zeek nightly build:
- uses: zeek/action-zkg-install@v2
with:
pkg: ${{ github.server_url }}/${{ github.repository }}
zeek_version: zeek-nightlyOn failure, the action collects zkg logs in case you'd like to process them
into artifacts, output them, etc. After the action completes, the logs reside in
${{ github.workspace }}/.action-zkg-install/artifacts. Here's a possible
artifact upload snippet:
- uses: actions/upload-artifact@v2
if: failure()
with:
name: zkg-logs
path: ${{ github.workspace }}/.action-zkg-install/artifactsThe latest version of this action is v2.2.0, with a corresponding v2 tag
tracking the latest v2.x.y release. In-development work is available by using
the action with @main.
The contained Docker image works as a standalone setup for testing
Zeek packages. See docker run -it <image> --help for details once
you've built the image.