ci: add the NIXPKGS_CHANNEL shortcut

This commit is contained in:
zimbatm 2019-12-20 17:16:21 +01:00
parent 9f61ec7d27
commit 7ed6a50917
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
3 changed files with 11 additions and 11 deletions

View file

@ -7,12 +7,14 @@ set -euo pipefail
./build
# default to Docker Hub
# the user has to set REGISTRY_USER and REGISTRY_PASSWORD
: "${REGISTRY:=docker.io}"
: "${IMAGE_PREFIX:=nixpkgs}"
# IMAGE_TAG is provided by .travis.yml
# the user has to set REGISTRY_USER and REGISTRY_PASSWORD
# either pass those two or set the NIXPKGS_CHANNEL
: "${IMAGE_TAG:=$NIXPKGS_CHANNEL}"
: "${NIX_PATH:=nixpkgs=channel:$NIXPKGS_CHANNEL}"
export NIX_PATH
if [[ "$TRAVIS_BRANCH" = master && -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
./docker-login "$REGISTRY_USER" "$REGISTRY_PASSWORD" "$REGISTRY"