Skip to content

How to get preview url, editor url and themeid from one step to another #29

@alexantom

Description

@alexantom

I would like to output preview url, editor URL and themeid so that it can be accessed in next steps. Is this something possible now or do we need to add below scripts.

entrypoint.sh

preview_url="$(cat "$theme_push_log" | tail -n 1 | jq -r '.theme.preview_url')"
editor_url="$(cat "$theme_push_log" | tail -n 1 | jq -r '.theme.editor_url')"
theme_id="$(cat "$theme_push_log" | tail -n 1 | jq -r '.theme.id')"
echo "::set-output name=preview_url::$preview_url"
echo "::set-output name=editor_url::$editor_url"
echo "::set-output name=theme_id::$theme_id"

ci.yml

- name: Lighthouse
        id: lighthouse
        uses: shopify/lighthouse-ci-action@1.0
        with:
          app_id: ${{ secrets.SHOP_APP_ID }}
          app_password: ${{ secrets.SHOP_APP_PASSWORD }}
          store:${{ secrets.SHOP}}
          password: ${{ secrets.SHOP_PASSWORD }}
- name: Print Deploy Output
        run: |
          echo "::Preview Url:: ${{steps.lighthouse.outputs.preview_url}}"
          echo "::Editor Url:: ${{steps.lighthouse.outputs.editor_url}}"
          echo "::Theme ID:: ${{steps.lighthouse.outputs.theme_id}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions