From 28595f50ddd8100f027c0db6b22fdf262e94d7ad Mon Sep 17 00:00:00 2001 From: carl hedgren Date: Mon, 27 Jan 2025 15:33:47 +0100 Subject: [PATCH] reintroduce side-channel loading of deploy_server Co-authored-by: Morten Lied Johansen Co-authored-by: Kyrre Havik --- actions/deploy/entrypoint.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/actions/deploy/entrypoint.sh b/actions/deploy/entrypoint.sh index f527d580..22e9a253 100755 --- a/actions/deploy/entrypoint.sh +++ b/actions/deploy/entrypoint.sh @@ -40,6 +40,20 @@ if [ -n "$IMAGE" ]; then yq w --inplace "$VARS" image "$IMAGE" fi +if [ -n "$DEPLOY_SERVER" ]; then + echo "::notice ::DEPLOY_SERVER is deprecated and should not be set, please remove from your workflow" +fi + +echo ::group::wget +wget https://storage.googleapis.com/github-deploy-data/$GITHUB_REPOSITORY_OWNER.json --output-document deploy.json +cat deploy.json + +#this is a newline! +echo +echo ::endgroup:: + +export DEPLOY_SERVER=$(jq --raw-output '.DEPLOY_SERVER' < deploy.json) + # if no apikey is set, use use the id-token to get a jwt token for the deploy CLI if [ -z "$APIKEY" ]; then if [ -z "$ACTIONS_ID_TOKEN_REQUEST_TOKEN" ] || [ -z "$ACTIONS_ID_TOKEN_REQUEST_URL" ]; then