forked from github-mirror/docker-nixpkgs
ci: add the NIXPKGS_CHANNEL shortcut
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user