mirror of
https://github.com/NationalSecurityAgency/datawave-helm-charts.git
synced 2026-11-07 05:56:18 -10:00
* Add CI job to release chart. Update common-service-library to use tagged version * Update startLocalTest.sh and update chart versions
35 lines
546 B
Bash
Executable File
35 lines
546 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
USERNAME=$1
|
|
PAT=$2
|
|
|
|
BASE64ENCODEDTOKEN=`echo -n "${USERNAME}:${PAT}" | base64`
|
|
|
|
|
|
read -r -d '' FILETEXT << EOF
|
|
{
|
|
"auths":
|
|
{
|
|
"ghcr.io":
|
|
{
|
|
"auth":"${BASE64ENCODEDTOKEN}"
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
|
|
FILE_ENCODED=`echo -n "$FILETEXT" | base64 | tr -d '\n' `
|
|
|
|
cat > ./ghcr-image-pull-secret.yaml <<- EOF
|
|
kind: Secret
|
|
type: kubernetes.io/dockerconfigjson
|
|
apiVersion: v1
|
|
metadata:
|
|
name: dockerconfigjson-ghcr
|
|
labels:
|
|
app: app-name
|
|
data:
|
|
.dockerconfigjson: ${FILE_ENCODED}
|
|
EOF
|
|
|