From 9a48841357a146cc17a734dcb1faf6f5ef3de676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wcis=C5=82o?= <115464873+wcislo-saleor@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:02:14 +0100 Subject: [PATCH] Fix action that configures login to staging Saleor Cloud for CLI (#4658) --- .changeset/neat-apples-bake.md | 5 +++++ .github/actions/cli-login/action.yml | 9 ++++++--- .github/actions/prepare-backups-variables/action.yml | 1 - .github/actions/prepare-instance/action.yml | 5 +---- .github/workflows/pr-cleanup.yml | 3 +-- 5 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 .changeset/neat-apples-bake.md diff --git a/.changeset/neat-apples-bake.md b/.changeset/neat-apples-bake.md new file mode 100644 index 00000000000..f40c819ced4 --- /dev/null +++ b/.changeset/neat-apples-bake.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Fix action that configures login to staging Saleor Cloud for CLI diff --git a/.github/actions/cli-login/action.yml b/.github/actions/cli-login/action.yml index 95d8243ad50..04c7dce4d83 100644 --- a/.github/actions/cli-login/action.yml +++ b/.github/actions/cli-login/action.yml @@ -1,8 +1,8 @@ name: Saleor CLI login -description: Saleor CLI login +description: Saleor CLI login to staging Saleor Cloud inputs: token: - description: "Cloud accces token" + description: "Cloud access token" required: true runs: using: "composite" @@ -12,4 +12,7 @@ runs: id: write-config-file env: ACCESS_TOKEN: ${{ inputs.token }} - run: jq --null-input --arg token "Token $ACCESS_TOKEN" '{"token":$token,"telemetry":"false","organization_slug":"saleor","organization_name":"Saleor"}' > ~/.config/saleor.json + run: | + jq --null-input \ + --arg token "Token $ACCESS_TOKEN" \ + '{"token":$token,"telemetry":"false","saleor_env":"staging","cloud_api_url":"https://staging-cloud.saleor.io/platform/api","organization_slug":"saleor","organization_name":"Saleor"}' > ~/.config/saleor.json diff --git a/.github/actions/prepare-backups-variables/action.yml b/.github/actions/prepare-backups-variables/action.yml index c46c3457a74..fa0060d0d47 100644 --- a/.github/actions/prepare-backups-variables/action.yml +++ b/.github/actions/prepare-backups-variables/action.yml @@ -29,7 +29,6 @@ runs: id: backup shell: bash env: - SALEOR_CLI_ENV: staging BACKUP_NAME: ${{ inputs.BACKUP_NAMESPACE }} run: | BACKUPS=$(npx saleor backup list --name="$BACKUP_NAME" --latest --json) diff --git a/.github/actions/prepare-instance/action.yml b/.github/actions/prepare-instance/action.yml index 6b8efed3fd4..68878357dae 100644 --- a/.github/actions/prepare-instance/action.yml +++ b/.github/actions/prepare-instance/action.yml @@ -36,7 +36,6 @@ runs: shell: bash id: instance_check env: - SALEOR_CLI_ENV: staging INSTANCE_NAME: ${{ inputs.POOL_NAME }} run: | set +o pipefail @@ -47,7 +46,6 @@ runs: shell: bash if: ${{ steps.instance_check.outputs.INSTANCE_KEY }} env: - SALEOR_CLI_ENV: staging BACKUP_ID: ${{ inputs.BACKUP_ID }} INSTANCE_NAME: ${{ inputs.POOL_NAME }} run: | @@ -59,7 +57,6 @@ runs: shell: bash if: ${{ !steps.instance_check.outputs.INSTANCE_KEY }} env: - SALEOR_CLI_ENV: staging BACKUP_ID: ${{ inputs.BACKUP_ID }} INSTANCE_NAME: ${{ inputs.POOL_NAME }} run: | @@ -70,4 +67,4 @@ runs: --saleor=saleor-master-staging \ --domain="$INSTANCE_NAME" \ --skip-restrict \ - --skip-webhooks-update \ No newline at end of file + --skip-webhooks-update diff --git a/.github/workflows/pr-cleanup.yml b/.github/workflows/pr-cleanup.yml index e3043d03c40..e94a1418860 100644 --- a/.github/workflows/pr-cleanup.yml +++ b/.github/workflows/pr-cleanup.yml @@ -24,6 +24,5 @@ jobs: - name: Remove instance env: - SALEOR_CLI_ENV: staging PULL_REQUEST_NUMBER: ${{ github.event.number }} - run: npx saleor env remove "pr-${PULL_REQUEST_NUMBER}" --force \ No newline at end of file + run: npx saleor env remove "pr-${PULL_REQUEST_NUMBER}" --force