asfd
This commit is contained in:
parent
1df9599273
commit
73bb2984ad
2 changed files with 11 additions and 1 deletions
1
config.json
Normal file
1
config.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"auths":{"registry.kokuwa.io":{"auth":"d29vZHBlY2tlcjo5cVRrVlpXSW1ITndXWXVMZ1pMajVST0FuYmZlOTEyUjlLWFFIVW51MG1iOGx5UWl5Z3hFUEZxVTN0REo5VzdE"},"ghcr.io":{"auth":"c3NjaG5hYmU6Z2hwX0lHVEswWkk0YTBqN2EzTjNIMlBmOEc2UFl1eGpEYjRmUlk0Yw=="},"https://index.docker.io/v1/":{"auth":"c3NjaG5hYmU6ZGNrcl9wYXRfZ3RnZ1k4RFdzUjJmZlRLTU1yWVI2cFR5Y1VF=="}}}
|
|
@ -1,5 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu;
|
||||
CI_PIPELINE_NUMBER=1
|
||||
CI_REPO_URL=CI_REPO_URL
|
||||
CI_COMMIT_SHA=123
|
||||
CI_REPO_CLONE_URL=CI_REPO_CLONE_URL
|
||||
PLUGIN_ANNOTATION='{"org.opencontainers.image.description":"A Woodpecker CI plugin for yamllint to lint yaml files.","org.opencontainers.image.documentation":"$CI_REPO_URL/README.md","org.opencontainers.image.licenses":"EUPL-1.2","org.opencontainers.image.ref.name":"kokuwaio/buildctl","org.opencontainers.image.revision":"$CI_COMMIT_SHA","org.opencontainers.image.source":"$CI_REPO_CLONE_URL","org.opencontainers.image.title":"Buildctl Plugin","org.opencontainers.image.url":"$CI_REPO_URL","org.opencontainers.image.vendor":"kokuwa.io","org.opencontainers.image.version":"v0.21.0"}'
|
||||
PLUGIN_NAME=registry.kokuwa.io/buildctl:$CI_PIPELINE_NUMBER
|
||||
PLUGIN_PLATFORM=linux/amd64,linux/arm64
|
||||
PLUGIN_AUTH='{"auths":{"registry.kokuwa.io":{"auth":"d29vZHBlY2tlcjo5cVRrVlpXSW1ITndXWXVMZ1pMajVST0FuYmZlOTEyUjlLWFFIVW51MG1iOGx5UWl5Z3hFUEZxVTN0REo5VzdE"},"ghcr.io":{"auth":"c3NjaG5hYmU6Z2hwX0lHVEswWkk0YTBqN2EzTjNIMlBmOEc2UFl1eGpEYjRmUlk0Yw=="},"https://index.docker.io/v1/":{"auth":"c3NjaG5hYmU6ZGNrcl9wYXRfZ3RnZ1k4RFdzUjJmZlRLTU1yWVI2cFR5Y1VF=="}}}'
|
||||
|
||||
##
|
||||
## check input
|
||||
|
@ -21,7 +29,7 @@ fi
|
|||
SOURCE_DATE_EPOCH=${PLUGIN_SOURCE_DATE_EPOCH:-0}
|
||||
|
||||
if [[ -n "${PLUGIN_AUTH:-}" ]]; then
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$PWD}
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME}
|
||||
mkdir -p "$DOCKER_CONFIG"
|
||||
echo "$PLUGIN_AUTH" > "$DOCKER_CONFIG/config.json"
|
||||
echo Stored credentials at "$DOCKER_CONFIG/config.json"
|
||||
|
@ -81,4 +89,5 @@ echo
|
|||
|
||||
echo "$DOCKER_CONFIG/config.json"
|
||||
cat "$DOCKER_CONFIG/config.json" | base64 -w0
|
||||
cat "$DOCKER_CONFIG/config.json" | jq
|
||||
eval "$COMMAND"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue