From 73bb2984added110ab8b2d776a1f60ba39063209 Mon Sep 17 00:00:00 2001 From: Stephan Schnabel Date: Sat, 7 Jun 2025 22:23:17 +0200 Subject: [PATCH] asfd --- config.json | 1 + entrypoint.sh | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 config.json diff --git a/config.json b/config.json new file mode 100644 index 0000000..ead8e77 --- /dev/null +++ b/config.json @@ -0,0 +1 @@ +{"auths":{"registry.kokuwa.io":{"auth":"d29vZHBlY2tlcjo5cVRrVlpXSW1ITndXWXVMZ1pMajVST0FuYmZlOTEyUjlLWFFIVW51MG1iOGx5UWl5Z3hFUEZxVTN0REo5VzdE"},"ghcr.io":{"auth":"c3NjaG5hYmU6Z2hwX0lHVEswWkk0YTBqN2EzTjNIMlBmOEc2UFl1eGpEYjRmUlk0Yw=="},"https://index.docker.io/v1/":{"auth":"c3NjaG5hYmU6ZGNrcl9wYXRfZ3RnZ1k4RFdzUjJmZlRLTU1yWVI2cFR5Y1VF=="}}} diff --git a/entrypoint.sh b/entrypoint.sh index ab4cf9b..8748913 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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"