Skip to content

Update image.json #1029

Update image.json

Update image.json #1029

name: Cloud storybook deployment
on:
workflow_dispatch:
push:
paths:
- 'storybook/**'
branches:
- 'vcst-*'
jobs:
gitops:
runs-on: ubuntu-latest
env:
ARGO_APP_NAME: ${{ github.ref_name }}
STORYBOOK_TAG: ''
steps:
- uses: actions/checkout@v4
- name: Install vc-build
run: |
dotnet tool install --global VirtoCommerce.GlobalTool
- name: Get theme version
id: storybook-version
run: |
echo "STORYBOOK_TAG=$(cat ./storybook/image.json | jq -r '.Tag')" >> $GITHUB_ENV
- name: Update environment
run: |
export PARAMETER_NAME=$(echo "custom.app1.image.tag" | xargs)
export PARAMETER_VALUE=$(echo "${{ env.STORYBOOK_TAG }}" | xargs)
vc-build CloudEnvSetParameter -EnvironmentName ${{ env.ARGO_APP_NAME }} -CloudToken ${{ secrets.VCST_PLATFORM_TOKEN }} -HelmParameters $PARAMETER_NAME=$PARAMETER_VALUE