Skip to content

Commit d2c0bde

Browse files
authored
Merge pull request #34 from reload/rasben-patch-1
Update Platform.sh CLI installation command
2 parents 167d538 + 3300ec1 commit d2c0bde

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

action.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,17 @@ runs:
5656
5757
sleep 5s
5858
59-
export PLATFORMSH_CLI_NO_INTERACTION=1;
59+
export UPSUN_CLI_NO_INTERACTION=1;
60+
export UPSUN_CLI_TOKEN=${{ inputs.PLATFORMSH_KEY }};
6061
export PLATFORM_PROJECT=${{ inputs.PLATFORMSH_ID }};
6162
export PLATFORM_BRANCH=${{ inputs.ENVIRONMENT_NAME }};
62-
export PLATFORMSH_CLI_TOKEN=${{ inputs.PLATFORMSH_KEY }};
6363
64-
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash
64+
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | VENDOR=upsun bash
65+
6566
export PATH="/home/runner/.local/bin:{$PATH}"
6667
6768
if [[ "${{ inputs.ALLOW_CANCEL_CRON }}" == 1 ]]; then \
68-
platform activity:cancel --type=environment.cron; \
69+
upsun activity:cancel --type=environment.cron; \
6970
fi
7071
7172
DETECTION_TRIES=0
@@ -81,13 +82,13 @@ runs:
8182
MAX_TRIES=$(( MAX_WAIT_SECONDS / DELAY_BETWEEN_ATTEMPTS ));
8283
8384
echo "We will now detect the PSH activities. You can view the deployment log using";
84-
echo " platform activity:log [ID] -p ${{ inputs.PLATFORMSH_ID }} -e ${{ inputs.ENVIRONMENT_NAME }}";
85+
echo " upsun activity:log [ID] -p ${{ inputs.PLATFORMSH_ID }} -e ${{ inputs.ENVIRONMENT_NAME }}";
8586
echo "----------------------";
8687
echo "";
8788
8889
while [ $TRIES -le $MAX_TRIES ]; do \
8990
TRIES=$((TRIES+1)); \
90-
ACTS=$(platform activities --format=plain --columns=id,state --incomplete --no-header --no-interaction --type=${{ inputs.ACTIVITY_TYPES }} 2>&1 || true); \
91+
ACTS=$(upsun activities --format=plain --columns=id,state --incomplete --no-header --no-interaction --type=${{ inputs.ACTIVITY_TYPES }} 2>&1 || true); \
9192
9293
echo "$ACTS"; \
9394
echo "----------------------"; \
@@ -101,17 +102,17 @@ runs:
101102
102103
echo ""
103104
104-
STATUS=$(platform env:info status 2>&1 || true)
105+
STATUS=$(upsun env:info status 2>&1 || true)
105106
106107
if [[ "$STATUS" =~ "inactive" ]]; then \
107-
echo "PlatformSH reports that the environment is not active. This might be because you have run out of available environment slots. Try to run 'platform env:activate -e ${{ inputs.ENVIRONMENT_NAME }} -p ${{ inputs.PLATFORMSH_ID }}'"; \
108+
echo "PlatformSH reports that the environment is not active. This might be because you have run out of available environment slots. Try to run 'upsun env:activate -e ${{ inputs.ENVIRONMENT_NAME }} -p ${{ inputs.PLATFORMSH_ID }}'"; \
108109
exit 2; \
109110
elif [[ "$SUCCESS" == 0 ]]; then \
110111
echo "$STATUS"; \
111112
exit 2; \
112113
fi
113114
114-
URL=$(platform env:url -1 --pipe)
115+
URL=$(upsun env:url -1 --pipe)
115116
116117
MAX_CURL_TRIES=5
117118
CURL_SLEEP_SECONDS=5

0 commit comments

Comments
 (0)