mirror of https://gitea.com/gitea/test-env.git
Added `-w 0` to base64 command for credientals produce a base64 value larger than 76 charters (#25)
If a username, and password that produces a base64 value larger than 76 characters, base64 will add \n to the output to wrap the text. The \n is then moved to the ~/.docker/config.json, that would break build image step producing the error of ``` WARNING: Error loading config file: /root/.docker/config.json: invalid character '\n' in string literal ``` Reviewed-on: https://gitea.com/gitea/test-env/pulls/25 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io> Co-authored-by: James712346 <james712346@noreply.gitea.io> Co-committed-by: James712346 <james712346@noreply.gitea.io>
This commit is contained in:
parent
9a7d3d6036
commit
7d38483860
|
@ -27,7 +27,7 @@ jobs:
|
|||
uses: https://github.com/docker/setup-buildx-action@v2
|
||||
- name: login into docker hub
|
||||
run: |
|
||||
BASE64_AUTH=`echo -n "$CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD" | base64`
|
||||
BASE64_AUTH=`echo -n "$CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD" | base64 -w 0`
|
||||
mkdir -p ~/.docker
|
||||
echo "{\"auths\": {\"$CI_REGISTRY\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json
|
||||
env:
|
||||
|
|
Loading…
Reference in New Issue