nix: add postgrest-docker-login wrapper func
This commit is contained in:
committed by
Steve Chavez
parent
122fea1507
commit
9f8d1af2cd
@@ -142,7 +142,7 @@ jobs:
|
||||
name: Publish Docker images
|
||||
command: |
|
||||
export DOCKER_REPO=postgrest
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
postgrest-docker-login
|
||||
postgrest-release-dockerhub
|
||||
postgrest-release-dockerhubdescription
|
||||
|
||||
|
||||
+10
-1
@@ -41,6 +41,15 @@ let
|
||||
--replace v${version} \
|
||||
${releaseFiles}
|
||||
'';
|
||||
# Wrapper for login with docker. $DOCKER_USER/$DOCKER_PASS vars come from CircleCI.
|
||||
# The DOCKER_USER is not the same as DOCKER_REPO because we use the https://hub.docker.com/u/postgrestbot account for uploading to dockerhub.
|
||||
dockerLogin =
|
||||
writeShellScriptBin "postgrest-docker-login"
|
||||
''
|
||||
set -euo pipefail
|
||||
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
'';
|
||||
|
||||
# Script for publishing a new release on Docker Hub.
|
||||
dockerHub =
|
||||
@@ -97,5 +106,5 @@ let
|
||||
in
|
||||
buildEnv {
|
||||
name = "postgrest-release";
|
||||
paths = [ github dockerHub dockerHubDescription ];
|
||||
paths = [ github dockerLogin dockerHub dockerHubDescription ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user