Skip to content

Commit

Permalink
Fix action that configures login to staging Saleor Cloud for CLI (#4658)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcislo-saleor committed Feb 2, 2024
1 parent 6473419 commit 9a48841
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-apples-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Fix action that configures login to staging Saleor Cloud for CLI
9 changes: 6 additions & 3 deletions .github/actions/cli-login/action.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
1 change: 0 additions & 1 deletion .github/actions/prepare-backups-variables/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions .github/actions/prepare-instance/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ runs:
shell: bash
id: instance_check
env:
SALEOR_CLI_ENV: staging
INSTANCE_NAME: ${{ inputs.POOL_NAME }}
run: |
set +o pipefail
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -70,4 +67,4 @@ runs:
--saleor=saleor-master-staging \
--domain="$INSTANCE_NAME" \
--skip-restrict \
--skip-webhooks-update
--skip-webhooks-update
3 changes: 1 addition & 2 deletions .github/workflows/pr-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
run: npx saleor env remove "pr-${PULL_REQUEST_NUMBER}" --force

0 comments on commit 9a48841

Please sign in to comment.